use of com.github.havardh.javaflow.ast.Class in project javaflow by havardh.
the class InheritanceTransformerTest method shouldLinkClassesWithParentOnMatchingName.
@Test
public void shouldLinkClassesWithParentOnMatchingName() {
Class parent = ClassBuilder.classBuilder().withName("Parent").withPackageName("com.github.havardh.a").build();
Class child = ClassBuilder.classBuilder().withName("Child").withParent(new Parent(CanonicalName.object("com.github.havardh.a", "Parent"))).build();
transformer.transform(asList(parent, child));
assertThat(child.getParent().get().getReference(), is(parent));
}
Aggregations