Compare commits
No commits in common. "85b2da391abf84e83d56bdc33fe4a436e08bf118" and "e67b64678b411f55f90e5bf75a051f4c78ff4e30" have entirely different histories.
85b2da391a
...
e67b64678b
@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.8.1</version>
|
||||
<version>5.6.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@ -26,14 +26,5 @@
|
||||
<!-- Disable resource folder -->
|
||||
<resources />
|
||||
|
||||
<!-- Run unit tests -->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
</project>
|
@ -11,7 +11,7 @@ import org.junit.jupiter.api.*;
|
||||
* @author Leon Hofmeister
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public class CancelTest {
|
||||
class CancelTest {
|
||||
|
||||
EventBus bus;
|
||||
int hits;
|
||||
@ -22,7 +22,7 @@ public class CancelTest {
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@BeforeEach
|
||||
public void registerListener() {
|
||||
void registerListener() {
|
||||
bus = new EventBus();
|
||||
bus.registerListener(this);
|
||||
}
|
||||
@ -34,7 +34,7 @@ public class CancelTest {
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Test
|
||||
public void testCancellation() {
|
||||
void testCancellation() {
|
||||
bus.dispatch(new SimpleEvent());
|
||||
assertEquals(1, hits);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test;
|
||||
* @author Kai S. K. Engelbart
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public class DeadTest {
|
||||
class DeadTest {
|
||||
|
||||
EventBus bus = new EventBus();
|
||||
String event = "This event has no handler";
|
||||
@ -22,7 +22,7 @@ public class DeadTest {
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@Test
|
||||
public void testDeadEvent() {
|
||||
void testDeadEvent() {
|
||||
bus.registerListener(this);
|
||||
bus.dispatch(event);
|
||||
assertTrue(deadEventHandled);
|
||||
@ -36,7 +36,7 @@ public class DeadTest {
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@Test
|
||||
public void testUnhandledDeadEvent() {
|
||||
void testUnhandledDeadEvent() {
|
||||
bus.dispatch(event);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import org.junit.jupiter.api.*;
|
||||
*/
|
||||
@Polymorphic
|
||||
@Priority(150)
|
||||
public class DispatchTest {
|
||||
class DispatchTest {
|
||||
|
||||
EventBus bus;
|
||||
static int hits;
|
||||
@ -23,7 +23,7 @@ public class DispatchTest {
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@BeforeEach
|
||||
public void registerListener() {
|
||||
void registerListener() {
|
||||
bus = new EventBus();
|
||||
bus.registerListener(this);
|
||||
bus.registerListener(SimpleEvent.class, e -> {
|
||||
@ -39,7 +39,7 @@ public class DispatchTest {
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Test
|
||||
public void testDispatch() {
|
||||
void testDispatch() {
|
||||
bus.dispatch(new SimpleEventSub());
|
||||
bus.dispatch(new SimpleEvent());
|
||||
}
|
||||
@ -50,7 +50,7 @@ public class DispatchTest {
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Test
|
||||
public void testPrintExecutionOrder() {
|
||||
void testPrintExecutionOrder() {
|
||||
String executionOrder = bus.printExecutionOrder(SimpleEvent.class);
|
||||
System.out.println(executionOrder);
|
||||
assertEquals(
|
||||
|
@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test;
|
||||
* @author Kai S. K. Engelbart
|
||||
* @since 1.1.0
|
||||
*/
|
||||
public class ExceptionTest {
|
||||
class ExceptionTest {
|
||||
|
||||
EventBus bus = new EventBus();
|
||||
String event = "This event will cause an exception";
|
||||
@ -23,7 +23,7 @@ public class ExceptionTest {
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@Test
|
||||
public void testExceptionEvent() {
|
||||
void testExceptionEvent() {
|
||||
bus.registerListener(this);
|
||||
bus.registerListener(new ExceptionListener());
|
||||
bus.dispatch(event);
|
||||
@ -38,7 +38,7 @@ public class ExceptionTest {
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@Test
|
||||
public void testUnhandledExceptionEvent() {
|
||||
void testUnhandledExceptionEvent() {
|
||||
bus.registerListener(this);
|
||||
bus.dispatch(event);
|
||||
bus.removeListener(this);
|
||||
|
@ -10,7 +10,7 @@ import org.junit.jupiter.api.*;
|
||||
* @author Kai S. K. Engelbart
|
||||
* @since 1.2.0
|
||||
*/
|
||||
public class NestedTest {
|
||||
class NestedTest {
|
||||
|
||||
EventBus bus;
|
||||
boolean nestedHit;
|
||||
@ -21,7 +21,7 @@ public class NestedTest {
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@BeforeEach
|
||||
public void registerListener() {
|
||||
void registerListener() {
|
||||
bus = new EventBus();
|
||||
bus.registerListener(this);
|
||||
}
|
||||
@ -34,7 +34,7 @@ public class NestedTest {
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Test
|
||||
public void testNestedDispatch() {
|
||||
void testNestedDispatch() {
|
||||
bus.dispatch(new SimpleEvent());
|
||||
assertTrue(nestedHit);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user