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