Skip to content

Commit aa13f54

Browse files
Copilotcarstenartur
andcommitted
Add negative assertions to test per code review feedback
Co-authored-by: carstenartur <3164220+carstenartur@users.noreply.github.com>
1 parent d4f775c commit aa13f54

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassFileTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,7 @@ public void testStaleBufferAfterJarRecreation() throws CoreException, IOExceptio
17111711
String source1 = classFile1.getSource();
17121712
assertNotNull("Source should be available for first jar", source1);
17131713
assertTrue("Source should contain 'test()' method", source1.contains("test()"));
1714+
assertFalse("Source should not contain 'newMethod()'", source1.contains("newMethod()"));
17141715

17151716
removeLibrary(project, "testlib.jar", "testlibsrc.zip");
17161717
String[] newPathAndContents = new String[] {
@@ -1728,6 +1729,7 @@ public void testStaleBufferAfterJarRecreation() throws CoreException, IOExceptio
17281729

17291730
assertNotNull("Source should be available for recreated jar", source2);
17301731
assertTrue("Source should contain new 'newMethod()'", source2.contains("newMethod()"));
1732+
assertFalse("Source should not contain old 'test()' method", source2.contains("test()"));
17311733
} finally {
17321734
if (project != null) {
17331735
deleteProject(project);

0 commit comments

Comments
 (0)