Migrate to JUnit5

This commit is contained in:
Artur Mogozov
2017-12-31 16:29:48 +09:00
parent a20e54d0a7
commit 6694d742a3
408 changed files with 2656 additions and 2165 deletions

View File

@ -22,7 +22,7 @@
*/
package com.iluwatar.callback;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.io.IOException;

View File

@ -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");
}
}