use of com.pushtorefresh.storio3.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfCreatorIsPrivate.
@Test
public void shouldNotCompileIfCreatorIsPrivate() {
JavaFileObject model = JavaFileObjects.forResource("PrivateCreator.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("StorIOContentResolverCreator can not be applied to private methods or constructors: <init>");
}
use of com.pushtorefresh.storio3.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.storio3.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfAnnotatedFieldIsPrivateAndDoesNotHaveGetter.
@Test
public void shouldNotCompileIfAnnotatedFieldIsPrivateAndDoesNotHaveGetter() {
JavaFileObject model = JavaFileObjects.forResource("PrivateFieldWithoutGetter.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("StorIOContentResolverColumn can not be applied to private field without corresponding getter: id");
}
use of com.pushtorefresh.storio3.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldCompileIfAnnotatedFieldIsPrivateAndHasNameStartingWithIs.
@Test
public void shouldCompileIfAnnotatedFieldIsPrivateAndHasNameStartingWithIs() {
JavaFileObject model = JavaFileObjects.forResource("PrivateFieldWithNameStartingWithIs.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).compilesWithoutError();
}
use of com.pushtorefresh.storio3.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldCompileWithPrimitiveFields.
@Test
public void shouldCompileWithPrimitiveFields() {
JavaFileObject model = JavaFileObjects.forResource("PrimitiveFields.java");
JavaFileObject generatedTypeMapping = JavaFileObjects.forResource("PrimitiveFieldsContentResolverTypeMapping.java");
JavaFileObject generatedDeleteResolver = JavaFileObjects.forResource("PrimitiveFieldsStorIOContentResolverDeleteResolver.java");
JavaFileObject generatedGetResolver = JavaFileObjects.forResource("PrimitiveFieldsStorIOContentResolverGetResolver.java");
JavaFileObject generatedPutResolver = JavaFileObjects.forResource("PrimitiveFieldsStorIOContentResolverPutResolver.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).compilesWithoutError().and().generatesSources(generatedTypeMapping, generatedDeleteResolver, generatedGetResolver, generatedPutResolver);
}
Aggregations