use of com.tngtech.archunit.core.importer.testexamples.classhierarchyimport.BaseClass in project ArchUnit by TNG.
the class ClassFileImporterTest method imports_base_class_in_class_hierarchy_correctly.
@Test
public void imports_base_class_in_class_hierarchy_correctly() {
JavaClass baseClass = new ClassFileImporter().importUrl(getClass().getResource("testexamples/classhierarchyimport")).get(BaseClass.class);
assertThat(baseClass.getConstructors()).as("Constructors of " + BaseClass.class.getSimpleName()).hasSize(2);
assertThat(baseClass.getFields()).as("Fields of " + BaseClass.class.getSimpleName()).hasSize(1);
assertThat(baseClass.getMethods()).as("Methods of " + BaseClass.class.getSimpleName()).hasSize(2);
assertThat(baseClass.getStaticInitializer().get().getMethodCallsFromSelf()).as("Calls from %s.<clinit>()", BaseClass.class.getSimpleName()).isNotEmpty();
}