Migrate to JUnit5
This commit is contained in:
@ -22,10 +22,10 @@
|
||||
*/
|
||||
package com.iluwatar.flux.action;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:11 PM
|
||||
|
@ -22,10 +22,10 @@
|
||||
*/
|
||||
package com.iluwatar.flux.action;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:15 PM
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.iluwatar.flux.app;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -29,8 +29,8 @@ import com.iluwatar.flux.action.ContentAction;
|
||||
import com.iluwatar.flux.action.MenuAction;
|
||||
import com.iluwatar.flux.action.MenuItem;
|
||||
import com.iluwatar.flux.store.Store;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
@ -38,9 +38,9 @@ import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@ -58,7 +58,7 @@ public class DispatcherTest {
|
||||
* Replace the instance with a fresh one before each test to make sure test cases have no
|
||||
* influence on each other.
|
||||
*/
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void setUp() throws Exception {
|
||||
final Constructor<Dispatcher> constructor;
|
||||
constructor = Dispatcher.class.getDeclaredConstructor();
|
||||
|
@ -27,9 +27,9 @@ import com.iluwatar.flux.action.ContentAction;
|
||||
import com.iluwatar.flux.action.MenuAction;
|
||||
import com.iluwatar.flux.action.MenuItem;
|
||||
import com.iluwatar.flux.view.View;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.Matchers.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
|
@ -27,9 +27,9 @@ import com.iluwatar.flux.action.ContentAction;
|
||||
import com.iluwatar.flux.action.MenuAction;
|
||||
import com.iluwatar.flux.action.MenuItem;
|
||||
import com.iluwatar.flux.view.View;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.Matchers.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
|
@ -24,7 +24,7 @@ package com.iluwatar.flux.view;
|
||||
|
||||
import com.iluwatar.flux.action.Content;
|
||||
import com.iluwatar.flux.store.ContentStore;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
|
@ -27,7 +27,7 @@ import com.iluwatar.flux.action.MenuItem;
|
||||
import com.iluwatar.flux.dispatcher.Dispatcher;
|
||||
import com.iluwatar.flux.store.MenuStore;
|
||||
import com.iluwatar.flux.store.Store;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
Reference in New Issue
Block a user