use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfNotClassAnnotatedWithTypeAnnotations.
@Test
public void shouldNotCompileIfNotClassAnnotatedWithTypeAnnotations() {
JavaFileObject model = JavaFileObjects.forResource("AnnotatedInterface.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("StorIOContentResolverType can be applied only to classes not to AnnotatedInterface");
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfClassContainsMultipleCreators.
@Test
public void shouldNotCompileIfClassContainsMultipleCreators() {
JavaFileObject model = JavaFileObjects.forResource("MultipleCreators.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Only one creator method or constructor is allowed: MultipleCreators");
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfClassDoesNotHaveKey.
@Test
public void shouldNotCompileIfClassDoesNotHaveKey() {
JavaFileObject model = JavaFileObjects.forResource("NoKey.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Class marked with StorIOContentResolverType annotation should have at least one KEY field or method marked with " + "StorIOContentResolverColumn annotation: NoKey");
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfNoArgConstructorIsAbsent.
@Test
public void shouldNotCompileIfNoArgConstructorIsAbsent() {
JavaFileObject model = JavaFileObjects.forResource("AbsenceOfNoArgConstructor.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("constructor AbsenceOfNoArgConstructor in class " + "com.pushtorefresh.storio.contentresolver.annotations.AbsenceOfNoArgConstructor cannot be applied to given types;\n" + " required: long\n" + " found: no arguments\n" + " reason: actual and formal argument lists differ in length");
}
use of com.pushtorefresh.storio.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileWithoutAnyUris.
@Test
public void shouldNotCompileWithoutAnyUris() {
JavaFileObject model = JavaFileObjects.forResource("NoUris.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Uri of NoUris annotated with StorIOContentResolverType is empty");
}
Aggregations