@Test public void test_matches_ReturnsFalse_WhenTheGivenTypeDoesNotHaveTheAnnotation() { AnnotationTypeMatcher matcher = new AnnotationTypeMatcher(Component.class, "", ""); assertFalse(matcher.matches(MyService.class)); }
@Test(expected = IllegalArgumentException.class) public void test_construction_ThrowsAnExceptionWhenANullAnnotationClassIsSupplied() { new AnnotationTypeMatcher(null, "", ""); }
@Test public void test_matches_ReturnsTrue_WhenTheGivenTypeDoesHaveTheAnnotation() { AnnotationTypeMatcher matcher = new AnnotationTypeMatcher(Component.class, "", ""); assertTrue(matcher.matches(MyController.class)); }