mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 14:59:37 +00:00
Java 11 migraiton: model-view-presenter
This commit is contained in:
@@ -26,16 +26,13 @@ package com.iluwatar.model.view.presenter;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application test
|
||||
*
|
||||
*/
|
||||
public class AppTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
String[] args = {};
|
||||
App.main(args);
|
||||
App.main(new String[]{});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -23,10 +23,10 @@
|
||||
|
||||
package com.iluwatar.model.view.presenter;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/21/15 - 12:12 PM
|
||||
*
|
||||
@@ -35,8 +35,8 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
public class FileLoaderTest {
|
||||
|
||||
@Test
|
||||
public void testLoadData() throws Exception {
|
||||
final FileLoader fileLoader = new FileLoader();
|
||||
public void testLoadData() {
|
||||
final var fileLoader = new FileLoader();
|
||||
fileLoader.setFileName("non-existing-file");
|
||||
assertNull(fileLoader.loadData());
|
||||
}
|
||||
|
||||
+4
-4
@@ -23,14 +23,14 @@
|
||||
|
||||
package com.iluwatar.model.view.presenter;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* This test case is responsible for testing our application by taking advantage of the
|
||||
* Model-View-Controller architectural pattern.
|
||||
@@ -79,7 +79,7 @@ public class FileSelectorPresenterTest {
|
||||
*/
|
||||
@Test
|
||||
public void updateFileNameToLoader() {
|
||||
String expectedFile = "Stamatis";
|
||||
var expectedFile = "Stamatis";
|
||||
stub.setFileName(expectedFile);
|
||||
|
||||
presenter.start();
|
||||
|
||||
Reference in New Issue
Block a user