/[schmitzm]/branches/2.3.KECK/src_junit/skrueger/i8n/SwitchLanguageDialogTest.java
ViewVC logotype

Diff of /branches/2.3.KECK/src_junit/skrueger/i8n/SwitchLanguageDialogTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 862 by alfonx, Sat May 22 01:24:46 2010 UTC revision 1098 by alfonx, Sun Oct 10 22:52:16 2010 UTC
# Line 33  import java.util.ArrayList; Line 33  import java.util.ArrayList;
33    
34  import junit.framework.TestCase;  import junit.framework.TestCase;
35    
36    import org.junit.Test;
37    
38    import schmitzm.swing.TestingUtil;
39    
40  public class SwitchLanguageDialogTest extends TestCase {  public class SwitchLanguageDialogTest extends TestCase {
41    
42          public void testDialog() {          @Test
43                  ArrayList<String> langsa = new ArrayList<String>();          public void testDialog() throws Throwable {
44                  langsa.add("fr");                  ArrayList<String> langs = new ArrayList<String>();
45                  langsa.add("tr");                  langs.add("fr");
46                  // INteractive test diabled                  langs.add("tr");
47                  // new SwitchLanguageDialog(null, langsa).setModal(false);  
48                    TestingUtil.testGui(new SwitchLanguageDialog(null, langs, false), 10);
49          }          }
50    
51            @Test
52            public void testDialogDoesntAppearIf0OrOneLangOnly() throws Throwable {
53                    ArrayList<String> langs = new ArrayList<String>();
54                    langs.add("fr");
55    
56                    long startTime = System.currentTimeMillis();
57                    TestingUtil.testGui(new SwitchLanguageDialog(null, langs, false), 2);
58                    assertTrue("dialog did pop up incorrectly", System.currentTimeMillis()
59                                    - startTime < 1000);
60            }
61    
62  }  }

Legend:
Removed from v.862  
changed lines
  Added in v.1098

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26