Search in sources :

Example 36 with StorIOContentResolverProcessor

use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.

the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfAnnotatedFieldNotInsideClass.

@Test
public void shouldNotCompileIfAnnotatedFieldNotInsideClass() {
    JavaFileObject model = JavaFileObjects.forResource("AnnotatedFieldNotInsideClass.java");
    assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Please apply StorIOContentResolverColumn only to members of class (fields or methods)" + " - not to members of AnnotatedFieldNotInsideClass");
}
Also used : JavaFileObject(javax.tools.JavaFileObject) StorIOContentResolverProcessor(com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor) Test(org.junit.Test)

Example 37 with StorIOContentResolverProcessor

use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.

the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfAnnotatedFieldInsideNotAnnotatedClass.

@Test
public void shouldNotCompileIfAnnotatedFieldInsideNotAnnotatedClass() {
    JavaFileObject model = JavaFileObjects.forResource("AnnotatedFieldInsideNotAnnotatedClass.java");
    assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Please annotate class AnnotatedFieldInsideNotAnnotatedClass with StorIOContentResolverType");
}
Also used : JavaFileObject(javax.tools.JavaFileObject) StorIOContentResolverProcessor(com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor) Test(org.junit.Test)

Example 38 with StorIOContentResolverProcessor

use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.

the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfThereIsAColumnWithSameName.

@Test
public void shouldNotCompileIfThereIsAColumnWithSameName() {
    JavaFileObject model = JavaFileObjects.forResource("SameColumnName.java");
    assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Column name already used in this class: id");
}
Also used : JavaFileObject(javax.tools.JavaFileObject) StorIOContentResolverProcessor(com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor) Test(org.junit.Test)

Aggregations

StorIOContentResolverProcessor (com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor)38 JavaFileObject (javax.tools.JavaFileObject)38 Test (org.junit.Test)38