use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelWithPrivateClassFails.
@Test
public void testModelWithPrivateClassFails() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithPrivateInnerClass.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).failsToCompile().withErrorContaining("private classes");
}
use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelWithoutSetter.
@Test
public void testModelWithoutSetter() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithoutSetter.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelWithoutSetter_.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 EpoxyResourceProcessorTest method testGenerateDefaultLayoutMethod.
@Test
public void testGenerateDefaultLayoutMethod() {
JavaFileObject model = JavaFileObjects.forResource("ModelForRProcessingTest.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelForRProcessingTest_.java");
assert_().about(javaSources()).that(Arrays.asList(model, R)).processedWith(new EpoxyProcessor()).compilesWithoutError().and().generatesSources(generatedModel);
}
use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelWithConstructors.
@Test
public void testModelWithConstructors() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithConstructors.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelWithConstructors_.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 testModelWithStaticAttributeFails.
@Test
public void testModelWithStaticAttributeFails() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithStaticField.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).failsToCompile().withErrorContaining("static");
}
Aggregations