Skip to content

Commit

Permalink
GH-1431: fix tests, failed due to newly added test data in the test p…
Browse files Browse the repository at this point in the history
…roject
  • Loading branch information
martinlippert committed Feb 26, 2025
1 parent 025382b commit 6caac67
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,20 @@ public class CustomEventListener {
}""", tempJavaDocUri);

List<? extends Location> references = editor.getReferences();
assertEquals(2, references.size());
assertEquals(3, references.size());

String expectedDefinitionUri1 = directory.toPath().resolve("src/main/java/com/example/events/demo/CustomEventPublisher.java").toUri().toString();
Location expectedLocation1 = new Location(expectedDefinitionUri1, new Range(new Position(15, 2), new Position(15, 48)));

assertTrue(references.contains(expectedLocation1));

// from type hierarchy of specialzed custom event
String expectedDefinitionUri2 = directory.toPath().resolve("src/main/java/com/example/events/demo/SpecializedCustomEventPublisher.java").toUri().toString();
Location expectedLocation2 = new Location(expectedDefinitionUri2, new Range(new Position(15, 2), new Position(15, 59)));

assertTrue(references.contains(expectedLocation2));

String expectedDefinitionUri3 = directory.toPath().resolve("src/main/java/com/example/events/demo/CustomEventPublisherWithAdditionalElements.java").toUri().toString();
Location expectedLocation3 = new Location(expectedDefinitionUri3, new Range(new Position(17, 2), new Position(17, 48)));
assertTrue(references.contains(expectedLocation3));
}

@Test
Expand Down

0 comments on commit 6caac67

Please sign in to comment.