Skip to content

Commit

Permalink
Merge pull request #12
Browse files Browse the repository at this point in the history
Fix: add new GroceryProduct fields in tests
  • Loading branch information
NrdnKrmt authored Nov 19, 2024
2 parents 0d9f11c + abba753 commit 04290cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
14 changes: 14 additions & 0 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ public class ClientServiceTest {
@Test
public void GetAllClients_Test() {
// GIVEN
GroceryProduct product = new GroceryProduct("1", "Fruit", "Apple", 0.99, "apple.jpg");
GroceryProduct product = new GroceryProduct("1", "Fruit", "Apple", 0.99, 1,"test-status" ,"apple.jpg");
List<GroceryProduct> shoppingList1 = List.of(product);
Client expectedClient1 = new Client("123", shoppingList1);

GroceryProduct product2 = new GroceryProduct("2", "Fruit", "Banana", 500, "banane.jpg");
GroceryProduct product3 = new GroceryProduct("3", "Fruit", "Kiwi", 1.80, "ps5.jpg");
GroceryProduct product2 = new GroceryProduct("2", "Fruit", "Banana", 500, 1,"test-status" ,"banane.jpg");
GroceryProduct product3 = new GroceryProduct("3", "Fruit", "Kiwi", 1.80, 1,"test-status" ,"ps5.jpg");
List<GroceryProduct> shoppingList2 = List.of(product2, product3);
Client expectedClient2 = new Client("456", shoppingList2);

Expand All @@ -40,7 +40,7 @@ public void GetAllClients_Test() {
@Test
public void GetClientById_Test() {
// GIVEN
GroceryProduct product = new GroceryProduct("1", "Fruit", "Apple", 0.99, "apple.jpg");
GroceryProduct product = new GroceryProduct("1", "Fruit", "Apple", 0.99, 1,"test-status" ,"apple.jpg");
List<GroceryProduct> shoppingList = List.of(product);
Client expectedClient = new Client("123", shoppingList);

Expand Down

0 comments on commit 04290cd

Please sign in to comment.