use of net.bytebuddy.description.annotation.AnnotationList in project byte-buddy by raphw.
the class TypeDescriptionForPackageDescriptionTest method testAnnotations.
@Test
public void testAnnotations() throws Exception {
AnnotationList annotationList = mock(AnnotationList.class);
when(packageDescription.getDeclaredAnnotations()).thenReturn(annotationList);
assertThat(typeDescription.getDeclaredAnnotations(), is(annotationList));
}
use of net.bytebuddy.description.annotation.AnnotationList in project byte-buddy by raphw.
the class MethodDescriptionLatentTest method testTypeInitializer.
@Test
public void testTypeInitializer() throws Exception {
TypeDescription typeDescription = mock(TypeDescription.class);
MethodDescription.InDefinedShape typeInitializer = new MethodDescription.Latent.TypeInitializer(typeDescription);
assertThat(typeInitializer.getDeclaringType(), is(typeDescription));
assertThat(typeInitializer.getReturnType(), is(TypeDescription.Generic.VOID));
assertThat(typeInitializer.getParameters(), is((ParameterList<ParameterDescription.InDefinedShape>) new ParameterList.Empty<ParameterDescription.InDefinedShape>()));
assertThat(typeInitializer.getExceptionTypes(), is((TypeList.Generic) new TypeList.Generic.Empty()));
assertThat(typeInitializer.getDeclaredAnnotations(), is((AnnotationList) new AnnotationList.Empty()));
assertThat(typeInitializer.getModifiers(), is(MethodDescription.TYPE_INITIALIZER_MODIFIER));
}
Aggregations