fix: clean-architecture logging deps and spotless formatting

This commit is contained in:
Ilkka Seppälä
2025-04-05 09:48:15 +03:00
parent ee699af6ef
commit 356db48c8e
17 changed files with 90 additions and 116 deletions
@@ -1,20 +1,19 @@
package com.iluwatar.cleanarchitecture;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class AppTest {
/**
* Issue: Add at least one assertion to this test case.
*
* Solution: Inserted assertion to check whether the execution of the main method in {@link App}
* throws an exception.
* <p>Solution: Inserted assertion to check whether the execution of the main method in {@link
* App} throws an exception.
*/
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
assertDoesNotThrow(() -> App.main(new String[] {}));
}
}
}
@@ -1,9 +1,9 @@
package com.iluwatar.cleanarchitecture;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class CartControllerTest {
@@ -15,7 +15,8 @@ public class CartControllerTest {
ProductRepository productRepository = new InMemoryProductRepository();
CartRepository cartRepository = new InMemoryCartRepository();
OrderRepository orderRepository = new InMemoryOrderRepository();
shoppingCartUseCase = new ShoppingCartService(productRepository, cartRepository, orderRepository);
shoppingCartUseCase =
new ShoppingCartService(productRepository, cartRepository, orderRepository);
cartController = new CartController(shoppingCartUseCase);
}
@@ -38,4 +39,4 @@ public class CartControllerTest {
assertEquals(1000.0, cartController.calculateTotal("user123"));
}
}
}