mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 21:25:38 +00:00
fix: clean-architecture logging deps and spotless formatting
This commit is contained in:
@@ -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[] {}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-4
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user