use of com.github.mvp4g.mvp4g2.core.eventbus.annotation.EventBus in project mvp4g2 by mvp4g.
the class DebugTest method testDebugAnnotationOnAMethod.
@Test
public void testDebugAnnotationOnAMethod() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/eventbus/debugAnnotationOnAMethod/DebugAnnotationOnAMethod.java"));
}
});
CompilationSubject.assertThat(compilation).failed();
CompilationSubject.assertThat(compilation).hadErrorContaining("@Debug can only be used on a type (interface)");
}
use of com.github.mvp4g.mvp4g2.core.eventbus.annotation.EventBus in project mvp4g2 by mvp4g.
the class DebugTest method testDebugAnnotationOnAClass.
@Test
public void testDebugAnnotationOnAClass() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/eventbus/debugAnnotationOnAClass/DebugAnnotationOnAClass.java"));
}
});
CompilationSubject.assertThat(compilation).failed();
CompilationSubject.assertThat(compilation).hadErrorContaining("@Debug can only be used on a type (interface)");
}
use of com.github.mvp4g.mvp4g2.core.eventbus.annotation.EventBus in project mvp4g2 by mvp4g.
the class EventbusTest method testEventBusAnnotationOnAMethod.
@Test
public void testEventBusAnnotationOnAMethod() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/eventbus/eventBusAnnotationOnAMethod/EventBusAnnotationOnAMethod.java"));
}
});
CompilationSubject.assertThat(compilation).failed();
CompilationSubject.assertThat(compilation).hadErrorContaining("@Eventbus can only be used on a type (interface)");
}
use of com.github.mvp4g.mvp4g2.core.eventbus.annotation.EventBus in project mvp4g2 by mvp4g.
the class EventbusTest method testStartEventTestEventBusWithMoreThanOneStartAnnotation.
@Test
public void testStartEventTestEventBusWithMoreThanOneStartAnnotation() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/event/startEventTestEventBusWithMoreThanOneStartAnnotation/StartEventTestEventBusWithMoreThanOneStartAnnotation.java"));
}
});
CompilationSubject.assertThat(compilation).failed();
CompilationSubject.assertThat(compilation).hadErrorContaining("@Start-annotation can only be used a single time in a eventbus interface");
}
use of com.github.mvp4g.mvp4g2.core.eventbus.annotation.EventBus in project mvp4g2 by mvp4g.
the class EventbusTest method testEventBusAnnotationOnAClass.
@Test
public void testEventBusAnnotationOnAClass() {
Compilation compilation = javac().withProcessors(new Mvp4g2Processor()).compile(new ArrayList<JavaFileObject>() {
{
add(JavaFileObjects.forResource("com/github/mvp4g/mvp4g2/processor/eventbus/eventBusAnnotationOnAClass/EventBusAnnotationOnAClass.java"));
}
});
CompilationSubject.assertThat(compilation).failed();
CompilationSubject.assertThat(compilation).hadErrorContaining("@Eventbus can only be used with an interface");
}
Aggregations