Exemplo n.º 1
0
 @SuppressWarnings("unchecked")
 @Test(expectedExceptions = AssertionError.class)
 public void testAnnotationSetDoesNotMatchB() {
   Set<Annotation> annotations = new HashSet<Annotation>();
   annotations.add(InjectLiteral.INSTANCE);
   Assert.assertAnnotationSetMatches(annotations, Any.class, Inject.class);
 }
Exemplo n.º 2
0
 @SuppressWarnings("unchecked")
 @Test
 public void testAnnotationSetMatches() {
   Set<Annotation> annotations = new HashSet<Annotation>();
   annotations.add(AnyLiteral.INSTANCE);
   annotations.add(InjectLiteral.INSTANCE);
   Assert.assertAnnotationSetMatches(annotations, Any.class, Inject.class);
 }
Exemplo n.º 3
0
 @SuppressWarnings("unchecked")
 @Test(expectedExceptions = NullPointerException.class)
 public void testAnnotationSetIsNull() {
   Assert.assertAnnotationSetMatches(null);
 }
Exemplo n.º 4
0
 @SuppressWarnings("unchecked")
 @Test(expectedExceptions = AssertionError.class)
 public void testAnnotationSetIsEmpty() {
   Assert.assertAnnotationSetMatches(new HashSet<Annotation>(), Any.class);
 }
Exemplo n.º 5
0
 @SuppressWarnings("unchecked")
 @Test
 public void testAnnotationSetIsEmptyAndRequiredAnnotationsEmpty() {
   Assert.assertAnnotationSetMatches(new HashSet<Annotation>());
 }