use of com.pushtorefresh.storio3.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfCreatorNotInsideClass.
@Test
public void shouldNotCompileIfCreatorNotInsideClass() {
JavaFileObject model = JavaFileObjects.forResource("CreatorNotInsideClass.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("Please apply StorIOContentResolverCreator to constructor or factory method of class - not to CreatorNotInsideClass");
}
use of com.pushtorefresh.storio3.contentresolver.annotations.processor.StorIOContentResolverProcessor in project storio by pushtorefresh.
the class StorIOContentResolverAnnotationsProcessorTest method shouldNotCompileIfCreatorMethodReturnsDifferentType.
@Test
public void shouldNotCompileIfCreatorMethodReturnsDifferentType() {
JavaFileObject model = JavaFileObjects.forResource("CreatorMethodWithDifferentReturnType.java");
assert_().about(javaSource()).that(model).processedWith(new StorIOContentResolverProcessor()).failsToCompile().withErrorContaining("StorIOContentResolverCreator can not be applied to method with return type different from CreatorMethodWithDifferentReturnType");
}
Aggregations