use of spoon.test.constructorcallnewclass.testclasses.Foo2 in project spoon by INRIA.
the class NewClassTest method testMoreThan9NewClass.
@Test
public void testMoreThan9NewClass() throws Exception {
final Factory build = build(Foo2.class);
final CtClass<?> foo = (CtClass<?>) build.Type().get(Foo2.class);
List<CtNewClass<?>> elements = foo.getElements(new AbstractFilter<CtNewClass<?>>(CtNewClass.class) {
@Override
public boolean matches(CtNewClass<?> element) {
return true;
}
});
assertEquals(13, elements.size());
assertEquals(Foo2.class.getCanonicalName() + "$12", elements.get(11).getAnonymousClass().getQualifiedName());
assertEquals(Foo2.class.getCanonicalName() + "$12$1", elements.get(12).getAnonymousClass().getQualifiedName());
}
Aggregations