use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class EpoxyProcessorTest method testModelWithFieldAnnotation.
@Test
public void testModelWithFieldAnnotation() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithFieldAnnotation.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelWithFieldAnnotation_.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 testModelWithAbstractClassAndAnnotation.
@Test
public void testModelWithAbstractClassAndAnnotation() {
JavaFileObject model = JavaFileObjects.forResource("ModelWithAbstractClassAndAnnotation.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("ModelWithAbstractClassAndAnnotation_.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 testModelWithHolderGeneratesNewHolderMethod.
@Test
public void testModelWithHolderGeneratesNewHolderMethod() {
JavaFileObject model = JavaFileObjects.forResource("AbstractModelWithHolder.java");
JavaFileObject generatedModel = JavaFileObjects.forResource("AbstractModelWithHolder_.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 testGeneratedDefaultMethodWithLayoutFailsIfNotSpecifiedInParent.
@Test
public void testGeneratedDefaultMethodWithLayoutFailsIfNotSpecifiedInParent() {
JavaFileObject model = JavaFileObjects.forResource("GenerateDefaultLayoutMethodParentStillNoLayout.java");
assert_().about(javaSource()).that(model).processedWith(new EpoxyProcessor()).failsToCompile().withErrorContaining("Model must specify a valid layout resource");
}
use of javax.tools.JavaFileObject in project epoxy by airbnb.
the class ConfigTest method testConfigRequireHashCodeIterablePasses.
@Test
public void testConfigRequireHashCodeIterablePasses() {
JavaFileObject model = forResource("ModelRequiresHashCodeIterableSucceeds.java");
assert_().about(javaSources()).that(asList(CONFIG_CLASS_REQUIRE_HASH, model)).processedWith(new EpoxyProcessor()).compilesWithoutError();
}
Aggregations