fixed pipeline issues

This commit is contained in:
Rithvik Sriram 2025-12-04 18:09:30 +01:00
commit 1ad959b238
3 changed files with 16 additions and 12 deletions

View file

@ -1,8 +1,7 @@
package client.utils;
import com.fasterxml.jackson.core.exc.StreamReadException;
import com.fasterxml.jackson.databind.DatabindException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.nio.file.Path;

View file

@ -19,6 +19,11 @@ import static org.junit.jupiter.api.Assertions.*;
public class ConfigServiceTest {
static ServerUtils dv = new ServerUtils();
private static final long TEST_ID_A = 23412L;
private static final long TEST_ID_B = 25412L;
@BeforeEach
public void setup(){
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
@ -49,8 +54,9 @@ public class ConfigServiceTest {
assertEquals("http://exmple12.com", config.getServerUrl());
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<>();
y.add("milk");

View file

@ -13,10 +13,12 @@ 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(){
public void setup(){
Assumptions.assumeTrue(dv.isServerAvailable(), "Server not available");
}
@ -40,14 +42,11 @@ public class ConfigTest {
x.add("Lava Cake");
x.add("Brownie");
ArrayList<Long> y = new ArrayList<>();
y.add(1234L);
y.add(1235L);
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);
}
}