use of com.github.mvp4g.mvp4g2.core.application.annotation.Application in project mvp4g2 by mvp4g.
the class ApplicationTest method testApplictionAnnotationOnAMethod.
@Test
public void testApplictionAnnotationOnAMethod() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationOnAMethod/ApplicationAnnotationOnAMethod.java"));
}
});
CompilationSubject.assertThat(compilation).failed();
CompilationSubject.assertThat(compilation).hadErrorContaining("@Application can only be used on a type (interface)");
}
use of com.github.mvp4g.mvp4g2.core.application.annotation.Application in project mvp4g2 by mvp4g.
the class ApplicationTest method testApplicationAnnotationOkWithLoaderAsInnerInterface.
@Test
public void testApplicationAnnotationOkWithLoaderAsInnerInterface() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterface.java"));
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/MockEventBus.java"));
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/MockOneEventHandler.java"));
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/MockShellPresenter.java"));
}
});
CompilationSubject.assertThat(compilation).succeeded();
JavaFileObjectSubject.assertThat(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java")).hasSourceEquivalentTo(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationOkWithLoaderAsInnerInterface/ApplicationAnnotationOkWithLoaderAsInnerInterfaceImpl.java"));
}
use of com.github.mvp4g.mvp4g2.core.application.annotation.Application in project mvp4g2 by mvp4g.
the class ApplicationTest method testApplicationAnnotationWithoutEventBusAttribute.
@Test
public void testApplicationAnnotationWithoutEventBusAttribute() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/application/applicationAnnotationWithoutEventBusAttribute/ApplicationAnnotationWithoutEventBusAttribute.java"));
}
});
CompilationSubject.assertThat(compilation).failed();
CompilationSubject.assertThat(compilation).hadErrorContaining("is missing a default value for the element 'eventBus");
}
Aggregations