Search in sources :

Example 1 with Mole

use of spoon.test.type.testclasses.Mole in project spoon by INRIA.

the class TypeTest method testIntersectionTypeOnTopLevelType.

@Test
public void testIntersectionTypeOnTopLevelType() throws Exception {
    final CtType<Mole> aMole = buildClass(Mole.class);
    assertEquals(1, aMole.getFormalCtTypeParameters().size());
    // New type parameter declaration.
    final CtTypeParameter typeParameter = aMole.getFormalCtTypeParameters().get(0);
    assertIntersectionTypeForMole(aMole, typeParameter.getSuperclass());
}
Also used : CtTypeParameter(spoon.reflect.declaration.CtTypeParameter) Mole(spoon.test.type.testclasses.Mole) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CtTypeParameter (spoon.reflect.declaration.CtTypeParameter)1 Mole (spoon.test.type.testclasses.Mole)1