use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfCreatorMethodIsNotStatic.
@Test
public void shouldNotCompileIfCreatorMethodIsNotStatic() {
JavaFileObject model = JavaFileObjects.forResource("NonStaticCreatorMethod.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("StorIOContentResolverCreator can not be applied to non-static methods: creator");
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfColumnNameIsEmpty.
@Test
public void shouldNotCompileIfColumnNameIsEmpty() {
JavaFileObject model = JavaFileObjects.forResource("EmptyColumnName.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Column name is empty: id");
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfAnnotatedFieldIsFinal.
@Test
public void shouldNotCompileIfAnnotatedFieldIsFinal() {
JavaFileObject model = JavaFileObjects.forResource("FinalField.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("StorIOContentResolverColumn can not be applied to final field: id");
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldCompileIfAnnotatedMethodIsFinal.
@Test
public void shouldCompileIfAnnotatedMethodIsFinal() {
JavaFileObject model = JavaFileObjects.forResource("FinalMethod.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).compilesWithoutError();
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfIgnoreNullIsUsedOnPrimitive.
@Test
public void shouldNotCompileIfIgnoreNullIsUsedOnPrimitive() {
JavaFileObject model = JavaFileObjects.forResource("IgnoreNullOnPrimitive.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("ignoreNull should not be used for primitive type: id");
}
Aggregations