1 33 34 package edu.rice.cs.drjava.model; 35 36 import junit.framework.*; 37 38 import java.io.File ; 39 import java.io.IOException ; 40 import java.util.LinkedList ; 41 import java.util.List ; 42 import java.util.Arrays ; 43 import javax.swing.SwingUtilities ; 44 45 import edu.rice.cs.drjava.model.compiler.CompilerListener; 46 import edu.rice.cs.drjava.model.junit.*; 47 import edu.rice.cs.util.Log; 48 import edu.rice.cs.util.UnexpectedException; 49 import edu.rice.cs.util.swing.Utilities; 50 51 54 public final class GlobalModelJUnitTest extends GlobalModelTestCase { 55 56 private static Log _log = new Log("MasterSlave.txt", false); 57 58 59 static final boolean printMessages = false; 60 61 private static final String ELSPETH_ERROR_TEXT = 62 "import junit.framework.TestCase;" + 63 "public class Elspeth extends TestCase {" + 64 " public void testMe() {" + 65 " String s = \"elspeth\";" + 66 " assertEquals(\"they match\", s, \"elspeth4\");" + 67 " }" + 68 " public Elspeth() {" + 69 " super();" + 70 " }" + 71 " public java.lang.String toString() {" + 72 " return \"Elspeth(\" + \")\";" + 73 " }" + 74 " public boolean equals(java.lang.Object o) {" + 75 " if ((o == null) || getClass() != o.getClass()) return false;" + 76 " return true;" + 77 " }" + 78 " public int hashCode() {" + 79 " return getClass().hashCode();" + 80 " }" + 81 "}"; 82 83 private static final String MONKEYTEST_PASS_TEXT = 84 "import junit.framework.*; \n" + 85 "import java.io.*; \n" + 86 "public class MonkeyTestPass extends TestCase { \n" + 87 " public MonkeyTestPass(String name) { super(name); } \n" + 88 " public void testShouldPass() { \n" + 89 " assertEquals(\"monkey\", \"monkey\"); \n" + 90 " } \n" + 91 "}\n"; 92 93 private static final String MONKEYTEST_PASS_ALT_TEXT = 94 "import junit.framework.*; \n" + 95 "import java.io.*; \n" + 96 "public class MonkeyTestPass extends TestCase { \n" + 97 " public MonkeyTestPass(String name) { super(name); } \n" + 98 " public void testShouldPass() { \n" + 99 " assertEquals(\"monkeys\", \"monkeys\"); \n" + 100 " } \n" + 101 "}\n"; 102 103 private static final String MONKEYTEST_FAIL_TEXT = 104 "import junit.framework.*; " + 105 "public class MonkeyTestFail extends TestCase { " + 106 " public MonkeyTestFail(String name) { super(name); } " + 107 " public void testShouldFail() { " + 108 " assertEquals(\"monkey\", \"baboon\"); " + 109 " } " + 110 "}"; 111 112 private static final String MONKEYTEST_ERROR_TEXT = 113 "import junit.framework.*; " + 114 "public class MonkeyTestError extends TestCase { " + 115 " public MonkeyTestError(String name) { super(name); } " + 116 " public void testThrowsError() { " + 117 " throw new Error(\"This is an error.\"); " + 118 " } " + 119 "}"; 120 121 130 private static final String NONPUBLIC_TEXT = 131 "import junit.framework.*; " + 132 "class NonPublic extends TestCase { " + 133 " NonPublic(String name) { super(name); } " + 134 " void testShouldFail() { " + 135 " assertEquals(\"monkey\", \"baboon\"); " + 136 " } " + 137 "}"; 138 139 private static final String NON_TESTCASE_TEXT = 140 "public class NonTestCase {}"; 141 142 private static final String MONKEYTEST_INFINITE_TEXT = 143 "import junit.framework.*; " + 144 "public class MonkeyTestInfinite extends TestCase { " + 145 " public MonkeyTestInfinite(String name) { super(name); } " + 146 " public void testInfinite() { " + 147 " while(true) {}" + 148 " } " + 149 "}"; 150 151 private static final String HAS_MULTIPLE_TESTS_PASS_TEXT = 152 "import junit.framework.*; " + 153 "public class HasMultipleTestsPass extends TestCase { " + 154 " public HasMultipleTestsPass(String name) { super(name); } " + 155 " public void testShouldPass() { " + 156 " assertEquals(\"monkey\", \"monkey\"); " + 157 " } " + 158 " public void testShouldAlsoPass() { " + 159 " assertTrue(true); " + 160 " } " + 161 "}"; 162 163 private static final String STATIC_INNER_TEST_TEXT = 164 "import junit.framework.TestCase;" + 165 " public class StaticInnerTestCase{" + 166 " public static class Sadf extends TestCase {" + 167 " public Sadf() {" + 168 " super();" + 169 " }" + 170 " public Sadf(String name) {" + 171 " super(name);" + 172 " }" + 173 " public void testX() {" + 174 " assertTrue(\"this is true\", true);" + 175 " }" + 176 " public void testY() {" + 177 " assertFalse(\"this is false\", false);" + 178 " }" + 179 " }" + 180 "}"; 181 182 private static final String MULTI_CLASSES_IN_FILE_TEXT = 183 "import junit.framework.TestCase;" + 184 " class A { } " + 185 " class B /* with syntax error */ { public void foo(int x) { } } " + 186 " public class Test extends TestCase { " + 187 " public void testAB() { assertTrue(\"this is true\", true); } " + 188 " }"; 189 190 193 public static Test suite() { return new TestSuite(GlobalModelJUnitTest.class); } 194 195 196 public void testNoJUnitErrors() throws Exception { 197 if (printMessages) System.out.println("----testNoJUnitErrors-----"); 198 200 OpenDefinitionsDocument doc = setupDocument(MONKEYTEST_PASS_TEXT); 201 final File file = new File (_tempDir, "MonkeyTestPass.java"); 202 doc.saveFile(new FileSelector(file)); 203 JUnitTestListener listener = new JUnitTestListener(); 204 _model.addListener(listener); 205 206 listener.compile(doc); listener.checkCompileOccurred(); 208 209 listener.runJUnit(doc); 210 211 listener.assertJUnitStartCount(1); 212 213 if (printMessages) System.out.println("errors: "+_model.getJUnitModel().getJUnitErrorModel()); 214 215 listener.assertNonTestCaseCount(0); 216 assertEquals("test case should have no errors reported", 0, 217 _model.getJUnitModel().getJUnitErrorModel().getNumErrors()); 218 219 _model.removeListener(listener); 220 _log.log("testNoJUnitErrors completed"); 221 } 222 223 224 public void testOneJUnitError() throws Exception { 225 if (printMessages) System.out.println("----testOneJUnitError-----"); 226 228 OpenDefinitionsDocument doc = setupDocument(MONKEYTEST_FAIL_TEXT); 229 final File file = new File (_tempDir, "MonkeyTestFail.java"); 230 doc.saveFile(new FileSelector(file)); 231 JUnitTestListener listener = new JUnitTestListener(); 232 _model.addListener(listener); 233 234 listener.compile(doc); 235 listener.checkCompileOccurred(); 236 237 listener.runJUnit(_model.getJUnitModel()); 238 239 assertEquals("test case has one error reported", 1, _model.getJUnitModel().getJUnitErrorModel().getNumErrors()); 240 _model.removeListener(listener); 241 242 _log.log("testOneJUnitError completed"); 243 } 244 245 246 public void testElspethOneJUnitError() throws Exception { 247 if (printMessages) System.out.println("----testElspethOneJUnitError-----"); 248 250 OpenDefinitionsDocument doc = setupDocument(ELSPETH_ERROR_TEXT); 251 final File file = new File (_tempDir, "Elspeth.java"); 252 doc.saveFile(new FileSelector(file)); 253 JUnitTestListener listener = new JUnitTestListener(); 254 _model.addListener(listener); 255 256 listener.compile(doc); 257 listener.checkCompileOccurred(); 258 259 listener.runJUnit(doc); 260 261 JUnitErrorModel jem = _model.getJUnitModel().getJUnitErrorModel(); 262 assertEquals("test case has one error reported", 1, jem.getNumErrors()); 263 assertTrue("first error should be an error not a warning", !jem.getError(0).isWarning()); 264 _model.removeListener(listener); 265 266 _log.log("testElspethOneJUnitError completed"); 267 } 268 269 270 public void testRealError() throws Exception { 271 if (printMessages) System.out.println("----testRealError-----"); 272 274 OpenDefinitionsDocument doc = setupDocument(MONKEYTEST_ERROR_TEXT); 275 final File file = new File (_tempDir, "MonkeyTestError.java"); 276 doc.saveFile(new FileSelector(file)); 277 JUnitTestListener listener = new JUnitTestListener(); 278 _model.addListener(listener); 279 280 listener.compile(doc); 281 listener.checkCompileOccurred(); 282 283 listener.runJUnit(doc); 284 285 assertEquals("test case has one error reported", 1, _model.getJUnitModel().getJUnitErrorModel().getNumErrors()); 286 listener.assertJUnitEndCount(1); 287 _model.removeListener(listener); 288 289 _log.log("testRealError completed"); 290 } 291 292 293 public void testNonTestCaseError() throws Exception { 294 if (printMessages) System.out.println("----testNonTestCaseError-----"); 295 297 final OpenDefinitionsDocument doc = setupDocument(NON_TESTCASE_TEXT); 298 final File file = new File (_tempDir, "NonTestCase.java"); 299 doc.saveFile(new FileSelector(file)); 300 301 JUnitTestListener listener = new JUnitNonTestListener(); 302 303 _model.addListener(listener); 304 305 listener.compile(doc); 306 listener.checkCompileOccurred(); 307 308 listener.runJUnit(doc); 309 310 if (printMessages) System.out.println("after test"); 311 312 listener.assertJUnitStartCount(0); listener.assertJUnitEndCount(0); listener.assertNonTestCaseCount(1); 316 listener.assertJUnitSuiteStartedCount(0); 317 listener.assertJUnitTestStartedCount(0); 318 listener.assertJUnitTestEndedCount(0); 319 _model.removeListener(listener); 320 321 _log.log("testNonTestCaseError completed"); 322 } 323 324 325 public void testResultOfNonPublicTestCase() throws Exception { 326 if (printMessages) System.out.println("----testResultOfNonPublicTestCase-----"); 327 329 final OpenDefinitionsDocument doc = setupDocument(NONPUBLIC_TEXT); 330 final File file = new File (_tempDir, "NonPublic.java"); 331 doc.saveFile(new FileSelector(file)); 332 333 JUnitTestListener listener = new JUnitTestListener(); 334 335 _model.addListener(listener); 336 337 listener.compile(doc); 338 listener.checkCompileOccurred(); 339 340 listener.runJUnit(doc); 341 342 if (printMessages) System.out.println("after test"); 343 344 346 listener.assertJUnitStartCount(1); 348 listener.assertJUnitEndCount(1); 349 350 assertEquals("test case has one error reported", 1, _model.getJUnitModel().getJUnitErrorModel().getNumErrors()); 351 _model.removeListener(listener); 352 353 _log.log("testResultOfNonPublicTestCase completed"); 354 } 355 356 360 382 383 public void testNoClassFile() throws Exception { 384 if (printMessages) System.out.println("----testNoClassFile-----"); 385 387 final OpenDefinitionsDocument doc = setupDocument(MONKEYTEST_PASS_TEXT); 388 final File file = new File (_tempDir, "MonkeyTestPass.java"); 389 doc.saveFile(new FileSelector(file)); 390 391 JUnitTestListener listener = new JUnitCompileBeforeTestListener(); 392 393 _model.addListener(listener); 394 395 397 listener.runJUnit(doc); 398 400 if (printMessages) System.out.println("after test"); 401 listener.assertCompileBeforeJUnitCount(1); 402 listener.assertNonTestCaseCount(0); 403 listener.assertJUnitStartCount(1); 404 listener.assertJUnitEndCount(1); 405 listener.assertJUnitSuiteStartedCount(1); 406 listener.assertJUnitTestStartedCount(1); 407 listener.assertJUnitTestEndedCount(1); 408 _model.removeListener(listener); 409 _log.log("testNoClassFile completed"); 410 } 411 412 413 public void testInfiniteLoop() throws Exception { 414 if (printMessages) System.out.println("----testInfiniteLoop-----"); 415 417 final OpenDefinitionsDocument doc = setupDocument(MONKEYTEST_INFINITE_TEXT); 418 final File file = new File (_tempDir, "MonkeyTestInfinite.java"); 419 doc.saveFile(new FileSelector(file)); 420 421 JUnitTestListener listener = new JUnitTestListener(false) { 422 public void junitSuiteStarted(int numTests) { 423 assertEquals("should run 1 test", 1, numTests); 424 synchronized(this) { junitSuiteStartedCount++; } 425 _model.resetInteractions(new File (System.getProperty("user.dir"))); 427 } 428 }; 429 430 _model.addListener(listener); 431 listener.compile(doc); 432 433 _log.log("Compilation of infinite loop completed"); 434 435 if (_model.getCompilerModel().getNumErrors() > 0) { 436 fail("compile failed: " + getCompilerErrorString()); 437 } 438 listener.checkCompileOccurred(); 439 440 444 listener.logJUnitStart(); 445 try { 446 _log.log("startJUnit being called"); 447 doc.startJUnit(); 448 listener.waitJUnitDone(); 449 fail("slave JVM should throw an exception because testing is interrupted by resetting interactions"); 450 } 451 catch (Exception e) { } 452 453 listener.waitResetDone(); 455 if (printMessages) System.out.println("after test"); 456 listener.assertJUnitStartCount(1); 457 _model.removeListener(listener); 458 listener.assertJUnitEndCount(1); 459 _log.log("testInfiniteLoop completed"); 460 } 461 462 465 public void testUnsavedAndUnCompiledChanges() throws Exception { 466 if (printMessages) System.out.println("-----testUnsavedAndUnCompiledChanges-----"); 467 468 OpenDefinitionsDocument doc = setupDocument(MONKEYTEST_PASS_TEXT); 469 final File file = new File (_tempDir, "MonkeyTestPass.java"); 470 doc.saveFile(new FileSelector(file)); 471 472 List <OpenDefinitionsDocument> docs = _model.getSortedOpenDefinitionsDocuments(); 473 474 final OpenDefinitionsDocument untitled = docs.get(0); 475 476 478 Utilities.invokeAndWait(new Runnable () { 479 public void run() { 480 untitled.quitFile(); 481 _model.closeFileWithoutPrompt(untitled); 482 } 483 }); 484 485 JUnitTestListener listener = new JUnitCompileBeforeTestListener(); 487 _model.addListener(listener); 488 489 doc.startCompile(); 490 491 493 listener.resetCompileCounts(); 494 495 changeDocumentText(MONKEYTEST_PASS_ALT_TEXT, doc); 496 498 listener.runJUnit(doc); 499 500 502 503 504 listener.assertSaveBeforeCompileCount(1); 505 listener.assertCompileBeforeJUnitCount(1); 506 listener.assertNonTestCaseCount(0); 507 listener.assertJUnitStartCount(1); 508 listener.assertJUnitEndCount(1); 509 listener.assertJUnitSuiteStartedCount(1); 510 listener.assertJUnitTestStartedCount(1); 511 listener.assertJUnitTestEndedCount(1); 512 513 if (printMessages) System.out.println("after test"); 514 _model.removeListener(listener); 515 516 assertEquals("test case should have no errors reported after modifying", 0, 517 _model.getJUnitModel().getJUnitErrorModel().getNumErrors()); 518 519 doc.saveFile(new FileSelector(file)); 520 521 listener = new JUnitTestListener(); 522 _model.addListener(listener); 523 524 525 assertEquals("test case should have no errors reported after saving", 0, 526 _model.getJUnitModel().getJUnitErrorModel().getNumErrors()); 527 _model.removeListener(listener); 528 529 _log.log("testUnsavedAndUnCompiledChanges completed"); 530 } 531 532 533 public void testJUnitAllWithNoValidTests() throws Exception { 534 535 537 JUnitNonTestListener listener = new JUnitNonTestListener(true); 538 _model.addListener(listener); 539 540 listener.runJUnit(_model.getJUnitModel()); 541 542 listener.assertNonTestCaseCount(1); 543 listener.assertJUnitSuiteStartedCount(0); 544 listener.assertJUnitTestStartedCount(0); 545 listener.assertJUnitTestEndedCount(0); 546 _model.removeListener(listener); 547 548 _log.log("First test of NoValidTests complete"); 549 550 JUnitCompileBeforeTestListener listener2 = new JUnitCompileBeforeTestListener(); 551 _model.addListener(listener2); 552 _log.log("Second listener added to model"); 553 OpenDefinitionsDocument doc = setupDocument(NON_TESTCASE_TEXT); 554 File file = new File (_tempDir, "NonTestCase.java"); 555 doc.saveFile(new FileSelector(file)); 556 557 listener2.compile(doc); 558 listener2.checkCompileOccurred(); 559 560 _log.log("Resetting compile counts"); 561 listener2.resetCompileCounts(); 562 563 File file2 = new File (_tempDir, "MonkeyTestPass.java"); 565 OpenDefinitionsDocument doc2 = setupDocument(MONKEYTEST_PASS_TEXT); 566 doc2.saveFile(new FileSelector(file2)); 567 listener2.runJUnit(_model.getJUnitModel()); 568 569 listener2.assertNonTestCaseCount(0); 570 listener2.assertJUnitSuiteStartedCount(1); 571 listener2.assertJUnitTestStartedCount(1); 572 listener2.assertJUnitTestEndedCount(1); 573 _model.removeListener(listener2); 574 575 _log.log("testJUnitAllWithNoValidTests completed"); 576 } 577 578 579 public void testJUnitAllWithNoErrors() throws Exception { 580 if (printMessages) System.out.println("-----testJUnitAllWithNoErrors-----"); 581 582 OpenDefinitionsDocument doc = setupDocument(NON_TESTCASE_TEXT); 583 JUnitNonTestListener listener = new JUnitNonTestListener(true); 584 File file = new File (_tempDir, "NonTestCase.java"); 585 doc.saveFile(new FileSelector(file)); 586 doc.startCompile(); 587 doc = setupDocument(MONKEYTEST_PASS_TEXT); 588 file = new File (_tempDir, "MonkeyTestPass.java"); 589 doc.saveFile(new FileSelector(file)); 590 doc.startCompile(); 591 _model.addListener(listener); 592 593 listener.runJUnit(_model.getJUnitModel()); 594 595 listener.assertNonTestCaseCount(0); 596 listener.assertJUnitSuiteStartedCount(1); 597 listener.assertJUnitTestStartedCount(1); 598 listener.assertJUnitTestEndedCount(1); 599 _model.removeListener(listener); 600 601 listener = new JUnitNonTestListener(true); 602 doc = setupDocument(HAS_MULTIPLE_TESTS_PASS_TEXT); 603 file = new File (_tempDir, "HasMultipleTestsPass.java"); 604 doc.saveFile(new FileSelector(file)); 605 doc.startCompile(); 606 _model.addListener(listener); 607 608 listener.runJUnit(_model.getJUnitModel()); 609 610 listener.assertNonTestCaseCount(0); 611 listener.assertJUnitSuiteStartedCount(1); 612 listener.assertJUnitTestStartedCount(3); 613 listener.assertJUnitTestEndedCount(3); 614 _model.removeListener(listener); 615 616 _log.log("testJUnitAllWithNoErrors completed"); 617 } 618 619 620 public void testJUnitAllWithErrors() throws Exception { 621 622 if (printMessages) System.out.println("-----testJUnitAllWithErrors-----"); 623 624 OpenDefinitionsDocument doc = setupDocument(MONKEYTEST_ERROR_TEXT); 625 OpenDefinitionsDocument doc2 = setupDocument(MONKEYTEST_FAIL_TEXT); 626 File file = new File (_tempDir, "MonkeyTestError.java"); 627 File file2 = new File (_tempDir, "MonkeyTestFail.java"); 628 doc.saveFile(new FileSelector(file)); 629 doc2.saveFile(new FileSelector(file2)); 630 JUnitNonTestListener listener = new JUnitNonTestListener(true); 631 _model.addListener(listener); 632 listener.compile(doc); 633 listener.checkCompileOccurred(); 634 listener.resetCompileCounts(); 635 listener.compile(doc2); 636 listener.checkCompileOccurred(); 637 638 listener.runJUnit(_model.getJUnitModel()); 639 640 listener.assertNonTestCaseCount(0); 641 listener.assertJUnitSuiteStartedCount(1); 642 listener.assertJUnitTestStartedCount(2); 643 listener.assertJUnitTestEndedCount(2); 644 _model.removeListener(listener); 645 646 JUnitErrorModel jem = _model.getJUnitModel().getJUnitErrorModel(); 647 assertEquals("test case has one error reported", 2, jem.getNumErrors()); 648 649 assertTrue("first error should be an error", jem.getError(0).isWarning()); 650 assertFalse("second error should be a failure", jem.getError(1).isWarning()); 651 652 _log.log("testJUnitAllWithErrors completed"); 653 } 654 655 656 public void testJUnitStaticInnerClass() throws Exception { 657 if (printMessages) System.out.println("-----testJUnitAllWithStaticInnerClass-----"); 658 659 OpenDefinitionsDocument doc = setupDocument(NON_TESTCASE_TEXT); 660 OpenDefinitionsDocument doc2 = setupDocument(STATIC_INNER_TEST_TEXT); 661 File file = new File (_tempDir, "NonTestCase.java"); 662 File file2 = new File (_tempDir, "StaticInnerTestCase.java"); 663 doc.saveFile(new FileSelector(file)); 664 doc2.saveFile(new FileSelector(file2)); 665 666 JUnitNonTestListener listener = new JUnitNonTestListener(true); 667 _model.addListener(listener); 668 listener.compile(doc); 669 listener.checkCompileOccurred(); 670 listener.resetCompileCounts(); 671 listener.compile(doc2); 672 listener.checkCompileOccurred(); 673 674 listener.runJUnit(_model.getJUnitModel()); 675 676 listener.assertNonTestCaseCount(0); 677 listener.assertJUnitSuiteStartedCount(1); 678 listener.assertJUnitTestStartedCount(2); 679 listener.assertJUnitTestEndedCount(2); 680 _model.removeListener(listener); 681 if (printMessages) System.out.println("----testJUnitAllWithNoErrors-----"); 682 683 _log.log("testJUnitStaticInnerClass completed"); 684 } 685 686 687 public class JUnitCompileBeforeTestListener extends JUnitTestListener { 688 689 690 public void compileBeforeJUnit(final CompilerListener testAfterCompile) { 691 synchronized(this) { compileBeforeJUnitCount++; } 693 _model.getCompilerModel().addListener(testAfterCompile); try { _model.getCompilerModel().compileAll(); } 697 catch(IOException e) { fail("Compile step generated IOException"); } 698 699 } 701 702 public void saveBeforeCompile() { 703 synchronized(this) { saveBeforeCompileCount++; } 705 706 try { 707 _model.saveAllFiles(new FileSaveSelector() { 708 public File getFile() { throw new UnexpectedException ("Test should not ask for save file name"); } 709 public boolean warnFileOpen(File f) { return false; } 710 public boolean verifyOverwrite() { return true; } 711 public boolean shouldSaveAfterFileMoved(OpenDefinitionsDocument doc, File oldFile) { return false; } 712 }); 713 } 714 catch(IOException e) { throw new UnexpectedException(e); } 715 } 716 public void fileSaved(OpenDefinitionsDocument doc) { } 717 } 718 719 722 public void testCorrectFilesAfterIncorrectChanges() throws Exception { 723 if (printMessages) System.out.println("-----testCorrectFilesAfterIncorrectChanges-----"); 724 725 OpenDefinitionsDocument doc = setupDocument(NON_TESTCASE_TEXT); 726 JUnitNonTestListener listener = new JUnitNonTestListener(true); 727 File file = new File (_tempDir, "NonTestCase.java"); 728 doc.saveFile(new FileSelector(file)); 729 doc.startCompile(); 730 doc = setupDocument(MULTI_CLASSES_IN_FILE_TEXT); 731 file = new File (_tempDir, "Test.java"); 732 doc.saveFile(new FileSelector(file)); 733 doc.startCompile(); 734 _model.addListener(listener); 735 736 listener.runJUnit(_model.getJUnitModel()); 737 738 listener.assertNonTestCaseCount(0); 739 listener.assertJUnitSuiteStartedCount(1); 740 listener.assertJUnitTestStartedCount(1); 741 listener.assertJUnitTestEndedCount(1); 742 _model.removeListener(listener); 743 744 doc.remove(87,4); 745 746 JUnitTestListener listener2 = new JUnitCompileBeforeTestListener(); 747 748 _model.addListener(listener2); 749 750 752 listener2.runJUnit(doc); 753 755 if (printMessages) System.out.println("after test"); 756 listener2.assertCompileBeforeJUnitCount(1); 757 listener2.assertNonTestCaseCount(1); 758 listener2.assertJUnitStartCount(0); 759 listener2.assertJUnitEndCount(0); 760 listener2.assertJUnitSuiteStartedCount(0); 761 listener2.assertJUnitTestStartedCount(0); 762 listener2.assertJUnitTestEndedCount(0); 763 _model.removeListener(listener2); 764 _log.log("testCorrectFilesAfterIncorrectChanges completed"); 765 } 766 } 767 | Popular Tags |