[mdc-cvs 84] CVS update: BetaProject/test/org/jent/checksmtp

Back to archive index

Takuya Ono takuy****@users*****
2007年 8月 23日 (木) 05:33:34 JST


Index: BetaProject/test/org/jent/checksmtp/ToListUITest.java
diff -u BetaProject/test/org/jent/checksmtp/ToListUITest.java:1.1 BetaProject/test/org/jent/checksmtp/ToListUITest.java:1.2
--- BetaProject/test/org/jent/checksmtp/ToListUITest.java:1.1	Sun Jul 22 16:56:30 2007
+++ BetaProject/test/org/jent/checksmtp/ToListUITest.java	Thu Aug 23 05:33:33 2007
@@ -27,21 +27,22 @@
   
   protected void setUp() throws Exception {
   }
-   
+  
   /**
    * Test of main method, of class org.jent.checksmtp.ToListUI.
+   *
+   * public void testMain() {
+   * System.out.println("main");
+   *
+   * String[] args = null;
+   *
+   * //ToListUI.main(args);
+   *
+   * //  review the generated test code and remove the default call to fail.
+   * //fail("The test case is a prototype.");
+   *
+   * }
    */
-  public void testMain() {
-    System.out.println("main");
-   
-    String[] args = null;
-     
-    //ToListUI.main(args);
-     
-    //  review the generated test code and remove the default call to fail.
-    //fail("The test case is a prototype.");
-     
-  }
   
   private void pushTestSetup(String msg) {
     arrayList.add(msg);
@@ -66,28 +67,52 @@
   }
   
   public void sayOK() {
+    System.out.println("sayOK");
     result = true;
     notifyResult();
   }
   
   public void sayNG() {
+    System.out.println("sayNG");
     result = false;
     notifyResult();
   }
-    
+  
   public void testPushOK() {
+    result = false;
     pushTestSetup("Please push OK button.");
     assertTrue("Time out or push CANCEL", result);
   }
   
   public void testPushCANCEL() {
+    result = true;
     pushTestSetup("Please push CANCEL button.");
     assertTrue("Time out or push OK", !result);
   }
   
   public void testPushClose() {
+    result = true;
     pushTestSetup("Please close Window.");
     assertTrue("Time out or push OK", !result);
   }
   
+  public void testPushCancelAfterTimeOut() {
+    ApplicationProperties.setConfirmTimeout(5);
+    
+    result = true;
+    pushTestSetup("Test Confirm Timeout 5sec. Please push CANCEL button.");
+    assertTrue("Time out or push OK", !result);
+    try {
+      System.out.println("Wait 10sec.");
+      synchronized(this) {
+        wait(10 * 1000);
+      }
+    } catch (InterruptedException ex) {
+      ex.printStackTrace();
+      fail("Wait Interrupted.");
+    }
+    assertTrue("Confirm Timeout Occurred wrong.", !result);
+    
+  }
+  
 }


mdc-cvs メーリングリストの案内
Back to archive index