Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeganea committed May 22, 2018
1 parent 9f86a35 commit 009a9e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public void testAnnotationInstance() {
AnnotationType annotationType = (AnnotationType) importer.types().named(AnnotationTypeWithMultipleAttributesForType.class.getName());
assertEquals(1, annotationType.getInstances().size());
AnnotationInstance annotationInstance = annotationType.getInstances().stream().findAny().get();
assertNotNull(annotationInstance.getSourceAnchor());
assertEquals(136,((IndexedFileAnchor)annotationInstance.getSourceAnchor()).getStartPos());
assertEquals(136,annotationInstance.getAstStartPosition());
assertEquals(5, annotationInstance.getAttributes().size());
annotationInstance.getAttributes().forEach(a -> assertNotNull(a.getAnnotationTypeAttribute()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ protected Class<?> sampleClass() {
@Test
public void testSuperConstructorInvocation() {
assertEquals(1, type.getSuperInheritances().size());
org.junit.Assert.assertNotNull(type.getSuperInheritances().stream().findFirst().get().getSourceAnchor());
org.junit.Assert.assertTrue(
type.getSuperInheritances().stream().findFirst().get().getAstStartPosition().intValue() > 0);
}
}

0 comments on commit 009a9e8

Please sign in to comment.