Takuya Ono
takuy****@users*****
2005年 11月 6日 (日) 16:59:37 JST
Index: BetaProject/src/test/org/jent/checksmtp/ToListDialogTest.java diff -u BetaProject/src/test/org/jent/checksmtp/ToListDialogTest.java:1.1 BetaProject/src/test/org/jent/checksmtp/ToListDialogTest.java:1.2 --- BetaProject/src/test/org/jent/checksmtp/ToListDialogTest.java:1.1 Sun Nov 6 06:15:16 2005 +++ BetaProject/src/test/org/jent/checksmtp/ToListDialogTest.java Sun Nov 6 16:59:37 2005 @@ -48,21 +48,37 @@ notifyResult(); } - public void test1() { + private void pushTestSetup(String msg) { + arrayList.add(msg); for (int i = 0; i < 100; i++) { arrayList.add("NO" + i); } toListDialog = new ToListDialog(this, arrayList); + arrayList.clear(); try { synchronized (this) { - wait(); + wait(30 * 1000); + //Wait 30sec } } catch (InterruptedException e) { - System.err.println("Dialg wait interrupted"); - e.printStackTrace(); + fail("Dialg wait interrupted"); } + } + + public void testPushOK() { + pushTestSetup("Please push OK button."); + assertTrue("Time out or push CANCEL", result); + } + + public void testPushCANCEL() { + pushTestSetup("Please push CANCEL button."); + assertTrue("Time out or push OK", !result); + } + public void testPushClose() { + pushTestSetup("Please close Window."); + assertTrue("Time out or push OK", !result); } }