fixed pipeline issues
This commit is contained in:
parent
26483e6d13
commit
1ad959b238
3 changed files with 16 additions and 12 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
package client.utils;
|
package client.utils;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.exc.StreamReadException;
|
|
||||||
import com.fasterxml.jackson.databind.DatabindException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
public class ConfigServiceTest {
|
public class ConfigServiceTest {
|
||||||
static ServerUtils dv = new ServerUtils();
|
static ServerUtils dv = new ServerUtils();
|
||||||
|
|
||||||
|
|
||||||
|
private static final long TEST_ID_A = 23412L;
|
||||||
|
private static final long TEST_ID_B = 25412L;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void setup(){
|
public void setup(){
|
||||||
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
|
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
|
||||||
|
|
@ -49,8 +54,9 @@ public class ConfigServiceTest {
|
||||||
assertEquals("http://exmple12.com", config.getServerUrl());
|
assertEquals("http://exmple12.com", config.getServerUrl());
|
||||||
|
|
||||||
List<Long> x = new ArrayList<>();
|
List<Long> x = new ArrayList<>();
|
||||||
x.add(23412L);
|
|
||||||
x.add(25412L);
|
x.add(TEST_ID_A);
|
||||||
|
x.add(TEST_ID_B);
|
||||||
|
|
||||||
List<String> y = new ArrayList<>();
|
List<String> y = new ArrayList<>();
|
||||||
y.add("milk");
|
y.add("milk");
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,12 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||||
public class ConfigTest {
|
public class ConfigTest {
|
||||||
static ServerUtils dv = new ServerUtils();
|
static ServerUtils dv = new ServerUtils();
|
||||||
|
|
||||||
|
private static final long FAV_LIST_ID_1 = 1234L;
|
||||||
|
private static final long FAV_LIST_ID_2 = 1235L;
|
||||||
|
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void setup(){
|
public void setup(){
|
||||||
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
|
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -40,14 +42,11 @@ public class ConfigTest {
|
||||||
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(1234L);
|
y.add(FAV_LIST_ID_1);
|
||||||
y.add(1235L);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue