-
-
Notifications
You must be signed in to change notification settings - Fork 342
/
CtTypeAssertInterface.java
37 lines (32 loc) · 1.63 KB
/
CtTypeAssertInterface.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
34
35
36
37
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 org.assertj.core.api.ListAssert;
import spoon.reflect.declaration.CtField;
import spoon.reflect.declaration.CtMethod;
import spoon.reflect.declaration.CtType;
import spoon.reflect.declaration.CtTypeMember;
import spoon.reflect.declaration.ModifierKind;
public interface CtTypeAssertInterface<A extends AbstractObjectAssert<A, W>, W extends CtType<?>> extends CtTypeInformationAssertInterface<A, W> , SpoonAssert<A, W> , CtNamedElementAssertInterface<A, W> , CtFormalTypeDeclarerAssertInterface<A, W> , CtShadowableAssertInterface<A, W> , CtTypeMemberAssertInterface<A, W> {
default ListAssert<CtField<?>> getFields() {
return Assertions.assertThat(actual().getFields());
}
default AbstractCollectionAssert<?, Collection<? extends CtMethod<?>>, CtMethod<?>, ?> getMethods() {
return Assertions.assertThat(actual().getMethods());
}
default AbstractCollectionAssert<?, Collection<? extends ModifierKind>, ModifierKind, ?> getModifiers() {
return Assertions.assertThat(actual().getModifiers());
}
default AbstractCollectionAssert<?, Collection<? extends CtType<?>>, CtType<?>, ?> getNestedTypes() {
return Assertions.assertThat(actual().getNestedTypes());
}
default AbstractStringAssert<?> getSimpleName() {
return Assertions.assertThat(actual().getSimpleName());
}
default ListAssert<CtTypeMember> getTypeMembers() {
return Assertions.assertThat(actual().getTypeMembers());
}
}