Java 11 migraiton: model-view-presenter

This commit is contained in:
Anurag Agarwal
2020-04-12 22:35:33 +00:00
parent edcb520d08
commit 99c70af16a
7 changed files with 34 additions and 58 deletions
@@ -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[]{});
}
}
@@ -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());
}
@@ -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();