use of spoon.test.comment.testclasses.Comment1 in project spoon by INRIA.
the class CommentTest method testCommentsInComment1And2.
@Test
public void testCommentsInComment1And2() {
Factory f = getSpoonFactory();
CtClass<?> type = (CtClass<?>) f.Type().get(Comment1.class);
List<CtComment> comments = type.getElements(new TypeFilter<CtComment>(CtComment.class));
assertEquals(4, comments.size());
type = (CtClass<?>) f.Type().get(Comment2.class);
comments = type.getElements(new TypeFilter<CtComment>(CtComment.class));
assertEquals(2, comments.size());
CtComment commentD = comments.get(1);
assertEquals("D", commentD.getContent());
}
Aggregations