use of com.pushtorefresh.storio.sqlite.annotations.processor.StorIOSQLiteProcessor in project storio by pushtorefresh.
the class StorIOSQLiteAnnotationsProcessorTest method shouldCompileWithBoxedTypesFields.
@Test
public void shouldCompileWithBoxedTypesFields() {
JavaFileObject model = JavaFileObjects.forResource("BoxedTypesFields.java");
JavaFileObject generatedTypeMapping = JavaFileObjects.forResource("BoxedTypesFieldsSQLiteTypeMapping.java");
JavaFileObject generatedDeleteResolver = JavaFileObjects.forResource("BoxedTypesFieldsStorIOSQLiteDeleteResolver.java");
JavaFileObject generatedGetResolver = JavaFileObjects.forResource("BoxedTypesFieldsStorIOSQLiteGetResolver.java");
JavaFileObject generatedPutResolver = JavaFileObjects.forResource("BoxedTypesFieldsStorIOSQLitePutResolver.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOSQLiteProcessor()).compilesWithoutError().and().generatesSources(generatedTypeMapping, generatedDeleteResolver, generatedGetResolver, generatedPutResolver);
}
use of com.pushtorefresh.storio.sqlite.annotations.processor.StorIOSQLiteProcessor in project storio by pushtorefresh.
the class StorIOSQLiteAnnotationsProcessorTest method shouldNotCompileIfAnnotatedFieldNotInsideClass.
@Test
public void shouldNotCompileIfAnnotatedFieldNotInsideClass() {
JavaFileObject model = JavaFileObjects.forResource("AnnotatedFieldNotInsideClass.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOSQLiteProcessor()).failsToCompile().withErrorContaining("Please apply StorIOSQLiteColumn only to members of class (fields or methods)" + " - not to members of AnnotatedFieldNotInsideClass");
}
use of com.pushtorefresh.storio.sqlite.annotations.processor.StorIOSQLiteProcessor in project storio by pushtorefresh.
the class StorIOSQLiteAnnotationsProcessorTest method shouldNotCompileIfAnnotatedFieldIsFinal.
@Test
public void shouldNotCompileIfAnnotatedFieldIsFinal() {
JavaFileObject model = JavaFileObjects.forResource("FinalField.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOSQLiteProcessor()).failsToCompile().withErrorContaining("StorIOSQLiteColumn can not be applied to final field: id");
}
use of com.pushtorefresh.storio.sqlite.annotations.processor.StorIOSQLiteProcessor in project storio by pushtorefresh.
the class StorIOSQLiteAnnotationsProcessorTest method shouldNotCompileIfAnnotatedFieldIsPrivate.
@Test
public void shouldNotCompileIfAnnotatedFieldIsPrivate() {
JavaFileObject model = JavaFileObjects.forResource("PrivateField.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOSQLiteProcessor()).failsToCompile().withErrorContaining("StorIOSQLiteColumn can not be applied to private field or method: id");
}
use of com.pushtorefresh.storio.sqlite.annotations.processor.StorIOSQLiteProcessor in project storio by pushtorefresh.
the class StorIOSQLiteAnnotationsProcessorTest method shouldNotCompileIfCreatorNotInsideClass.
@Test
public void shouldNotCompileIfCreatorNotInsideClass() {
JavaFileObject model = JavaFileObjects.forResource("CreatorNotInsideClass.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOSQLiteProcessor()).failsToCompile().withErrorContaining("Please apply StorIOSQLiteCreator to constructor or factory method of class - not to CreatorNotInsideClass");
}
Aggregations