Search in sources :

Example 1 with Exclude

use of com.yahoo.elide.annotation.Exclude in project elide by yahoo.

the class EntityDictionaryTest method testGetFirstAnnotationConflict.

@Test
public void testGetFirstAnnotationConflict() {
    @Exclude
    @Include(rootLevel = false)
    class Foo {
    }
    Annotation first = getFirstAnnotation(ClassType.of(Foo.class), Arrays.asList(Exclude.class, Include.class));
    assertTrue(first instanceof Exclude);
}
Also used : Exclude(com.yahoo.elide.annotation.Exclude) Include(com.yahoo.elide.annotation.Include) Annotation(java.lang.annotation.Annotation) Test(org.junit.jupiter.api.Test)

Example 2 with Exclude

use of com.yahoo.elide.annotation.Exclude in project elide by yahoo.

the class EntityDictionaryTest method testGetFirstAnnotation.

@Test
public void testGetFirstAnnotation() {
    @Exclude
    class Foo {
    }
    @Include(rootLevel = false)
    class Bar extends Foo {
    }
    class Baz extends Bar {
    }
    Annotation first = getFirstAnnotation(ClassType.of(Baz.class), Arrays.asList(Exclude.class, Include.class));
    assertTrue(first instanceof Include);
}
Also used : Exclude(com.yahoo.elide.annotation.Exclude) Include(com.yahoo.elide.annotation.Include) Annotation(java.lang.annotation.Annotation) Test(org.junit.jupiter.api.Test)

Aggregations

Exclude (com.yahoo.elide.annotation.Exclude)2 Include (com.yahoo.elide.annotation.Include)2 Annotation (java.lang.annotation.Annotation)2 Test (org.junit.jupiter.api.Test)2