-
-
Notifications
You must be signed in to change notification settings - Fork 342
/
CtTypeReferenceAssertInterface.java
33 lines (28 loc) · 1.48 KB
/
CtTypeReferenceAssertInterface.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package spoon.testing.assertions;
import java.util.Collection;
import org.assertj.core.api.AbstractCollectionAssert;
import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.api.AbstractStringAssert;
import org.assertj.core.api.Assertions;
import spoon.reflect.declaration.ModifierKind;
import spoon.reflect.reference.CtTypeReference;
interface CtTypeReferenceAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtTypeReference<?>> extends CtTypeInformationAssertInterface<A, W> , SpoonAssert<A, W> , CtActualTypeContainerAssertInterface<A, W> , CtReferenceAssertInterface<A, W> , CtShadowableAssertInterface<A, W> {
default CtTypeReferenceAssertInterface<?, ?> getDeclaringType() {
return SpoonAssertions.assertThat(actual().getDeclaringType());
}
default AbstractCollectionAssert<?, Collection<? extends ModifierKind>, ModifierKind, ?> getModifiers() {
return Assertions.assertThat(actual().getModifiers());
}
default CtPackageReferenceAssertInterface<?, ?> getPackage() {
return SpoonAssertions.assertThat(actual().getPackage());
}
default AbstractStringAssert<?> getSimpleName() {
return Assertions.assertThat(actual().getSimpleName());
}
default AbstractCollectionAssert<?, Collection<? extends CtTypeReference<?>>, CtTypeReference<?>, ?> getSuperInterfaces() {
return Assertions.assertThat(actual().getSuperInterfaces());
}
default CtTypeReferenceAssertInterface<?, ?> getSuperclass() {
return SpoonAssertions.assertThat(actual().getSuperclass());
}
}