use of com.tngtech.archunit.core.importer.testexamples.nestedimport.ClassWithNestedClass in project ArchUnit by TNG.
the class ClassFileImporterTest method handles_static_modifier_of_nested_classes.
@Test
public void handles_static_modifier_of_nested_classes() {
JavaClasses classes = new ClassFileImporter().importUrl(getClass().getResource("testexamples/nestedimport"));
assertThat(classes.get(ClassWithNestedClass.class).getModifiers()).as("modifiers of ClassWithNestedClass").doesNotContain(STATIC);
assertThat(classes.get(ClassWithNestedClass.NestedClass.class).getModifiers()).as("modifiers of ClassWithNestedClass.NestedClass").doesNotContain(STATIC);
assertThat(classes.get(ClassWithNestedClass.StaticNestedClass.class).getModifiers()).as("modifiers of ClassWithNestedClass.StaticNestedClass").contains(STATIC);
assertThat(classes.get(ClassWithNestedClass.NestedInterface.class).getModifiers()).as("modifiers of ClassWithNestedClass.NestedInterface").contains(STATIC);
assertThat(classes.get(ClassWithNestedClass.StaticNestedInterface.class).getModifiers()).as("modifiers of ClassWithNestedClass.StaticNestedInterface").contains(STATIC);
}
Aggregations