Skip to content

Commit

Permalink
Create dedicated test for JavaAccess.toClassDependencies()
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitry Polivaev <dimitry.polivaev@unite.eu>
Signed-off-by: Dimitry Polivaev <dpolivaev@gmx.de>
  • Loading branch information
dpolivaevUnite authored and dpolivaev committed Feb 16, 2024
1 parent f46ca50 commit 2d87914
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ public void when_the_origin_is_an_inner_class_the_toplevel_class_is_displayed_as
.inLineNumber(7);

assertThat(access.getDescription()).contains("(SomeClass.java:7)");
}
@Test
public void java_access_transforms_to_class_dependency() {
TestJavaAccess access = anyAccess();
Dependency dependency = getOnlyElement(access.toClassDependencies());

assertThatType(dependency.getOriginClass()).as("origin class").isEqualTo(access.getOriginOwner());
assertThatType(dependency.getTargetClass()).as("target class").isEqualTo(access.getTargetOwner());
Assertions.assertThat(dependency.getDescription()).as("description").isEqualTo(access.getDescription());
}
Expand Down

0 comments on commit 2d87914

Please sign in to comment.