Migrate to JUnit5
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.iluwatar.callback;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
||||
*/
|
||||
package com.iluwatar.callback;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* Add a field as a counter. Every time the callback method is called increment this field. Unit
|
||||
@ -47,15 +47,15 @@ public class CallbackTest {
|
||||
|
||||
Task task = new SimpleTask();
|
||||
|
||||
assertEquals("Initial calling count of 0", new Integer(0), callingCount);
|
||||
assertEquals(new Integer(0), callingCount, "Initial calling count of 0");
|
||||
|
||||
task.executeWith(callback);
|
||||
|
||||
assertEquals("Callback called once", new Integer(1), callingCount);
|
||||
assertEquals(new Integer(1), callingCount, "Callback called once");
|
||||
|
||||
task.executeWith(callback);
|
||||
|
||||
assertEquals("Callback called twice", new Integer(2), callingCount);
|
||||
assertEquals(new Integer(2), callingCount, "Callback called twice");
|
||||
|
||||
}
|
||||
|
||||
@ -65,15 +65,15 @@ public class CallbackTest {
|
||||
|
||||
Task task = new SimpleTask();
|
||||
|
||||
assertEquals("Initial calling count of 0", new Integer(0), callingCount);
|
||||
assertEquals(new Integer(0), callingCount, "Initial calling count of 0");
|
||||
|
||||
task.executeWith(callback);
|
||||
|
||||
assertEquals("Callback called once", new Integer(1), callingCount);
|
||||
assertEquals(new Integer(1), callingCount, "Callback called once");
|
||||
|
||||
task.executeWith(callback);
|
||||
|
||||
assertEquals("Callback called twice", new Integer(2), callingCount);
|
||||
assertEquals(new Integer(2), callingCount, "Callback called twice");
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user