Removed the server dependancy, so they aren't skipped
This commit is contained in:
parent
973ccfc50e
commit
c83d80bb74
2 changed files with 6 additions and 19 deletions
|
|
@ -1,9 +1,6 @@
|
|||
package client.scenes;
|
||||
|
||||
import client.utils.Config;
|
||||
import client.utils.ServerUtils;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -11,22 +8,15 @@ import java.util.ArrayList;
|
|||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class ConfigTest {
|
||||
static ServerUtils dv = new ServerUtils();
|
||||
|
||||
private static final long FAV_LIST_ID_1 = 1234L;
|
||||
private static final long FAV_LIST_ID_2 = 1235L;
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setup(){
|
||||
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void configDefaultValueTest(){
|
||||
|
||||
Config config = new Config();
|
||||
|
||||
assertEquals("en", config.getLanguage());
|
||||
assertEquals("http://localhost:8080", config.getServerUrl());
|
||||
assertTrue(config.getFavourites().isEmpty());
|
||||
|
|
@ -38,13 +28,16 @@ public class ConfigTest {
|
|||
Config config = new Config();
|
||||
config.setLanguage("nl");
|
||||
config.setServerUrl("http://localhost:8081");
|
||||
|
||||
ArrayList<String> x = new ArrayList<>();
|
||||
x.add("Lava Cake");
|
||||
x.add("Brownie");
|
||||
|
||||
ArrayList<Long> y = new ArrayList<>();
|
||||
y.add(FAV_LIST_ID_1);
|
||||
y.add(FAV_LIST_ID_2);
|
||||
config.setFavourites(y);
|
||||
|
||||
assertEquals(config.getFavourites(), y);
|
||||
config.setShoppingList(x);
|
||||
assertEquals(config.getShoppingList(), x);
|
||||
|
|
|
|||
|
|
@ -2,11 +2,9 @@ package client.scenes;
|
|||
|
||||
import client.utils.DefaultValueFactory;
|
||||
import client.utils.PrintExportService;
|
||||
import client.utils.ServerUtils;
|
||||
import commons.Recipe;
|
||||
import commons.RecipeIngredient;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
|
||||
|
|
@ -19,11 +17,7 @@ import java.util.List;
|
|||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class PrintExportTest {
|
||||
static ServerUtils dv = new ServerUtils();
|
||||
@BeforeEach
|
||||
public void setup(){
|
||||
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void buildRecipeTextTest(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue