use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelWithFinalAttribute.
@Test
public void testModelWithFinalAttribute() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithFinalField.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelWithFinalField_.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).compilesWithoutError().and().generatesSources(generatedModel);
}
use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelAsInnerClassFails.
@Test
public void testModelAsInnerClassFails() {
JavaFileObject model = JavaFileObjects.forResource("ModelAsInnerClass.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).failsToCompile().withErrorContaining("Nested classes");
}
use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelWithAnnotatedClass.
@Test
public void testModelWithAnnotatedClass() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithAnnotatedClass.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelWithAnnotatedClass_.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).compilesWithoutError().and().generatesSources(generatedModel);
}
use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testGeneratedDefaultMethodWithLayoutSpecifiedInNextParent.
@Test
public void testGeneratedDefaultMethodWithLayoutSpecifiedInNextParent() {
JavaFileObject model = JavaFileObjects.forResource("GenerateDefaultLayoutMethodNextParentLayout.java");
JavaFileObject generatedNoLayoutModel = JavaFileObjects.forResource("GenerateDefaultLayoutMethodNextParentLayout$NoLayout.java");
JavaFileObject generatedStillNoLayoutModel = JavaFileObjects.forResource("GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout.java");
JavaFileObject generatedWithLayoutModel = JavaFileObjects.forResource("GenerateDefaultLayoutMethodNextParentLayout$WithLayout.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).compilesWithoutError().and().generatesSources(generatedNoLayoutModel, generatedStillNoLayoutModel, generatedWithLayoutModel);
}
use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelReturningClassTypeWithVarargs.
@Test
public void testModelReturningClassTypeWithVarargs() {
JavaFileObject model = JavaFileObjects.forResource("ModelReturningClassTypeWithVarargs.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelReturningClassTypeWithVarargs_.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).compilesWithoutError().and().generatesSources(generatedModel);
}
Aggregations