use of org.apache.dubbo.config.annotation.Service in project dubbo by alibaba.
the class AnnotationUtilsTest method testGetDeclaredAnnotations.
@Test
public void testGetDeclaredAnnotations() {
List<Annotation> annotations = getDeclaredAnnotations(A.class);
assertADeclaredAnnotations(annotations, 0);
annotations = getDeclaredAnnotations(A.class, a -> isSameType(a, Service.class));
assertEquals(1, annotations.size());
Service service = (Service) annotations.get(0);
assertEquals("java.lang.CharSequence", service.interfaceName());
assertEquals(CharSequence.class, service.interfaceClass());
}
use of org.apache.dubbo.config.annotation.Service in project dubbo by alibaba.
the class AnnotationUtilsTest method testFindAnnotation.
@Test
public void testFindAnnotation() {
Service service = findAnnotation(A.class, Service.class);
assertEquals("java.lang.CharSequence", service.interfaceName());
assertEquals(CharSequence.class, service.interfaceClass());
service = findAnnotation(B.class, Service.class);
assertEquals(CharSequence.class, service.interfaceClass());
}
Aggregations