mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 15:27:13 +00:00
deps: Refactor dependencies (#3224)
* remove spring dep move junit, logging, mockito under dep mgmt * upgrade anti-corruption-layer deps * async method invocation * balking, bloc * bridge to bytecode * caching * callback - cqrs * component - health check * hexagonal - metadata mapping * rest of the patterns * remove checkstyle, take spotless into use
This commit is contained in:
@@ -37,23 +37,22 @@ import org.junit.jupiter.api.Test;
|
||||
* single responsibility principle. If this test method failed after a small code change, it might
|
||||
* take some digging to discover why.
|
||||
*/
|
||||
|
||||
class CashAntiAAATest {
|
||||
|
||||
@Test
|
||||
void testCash() {
|
||||
//initialize
|
||||
// initialize
|
||||
var cash = new Cash(3);
|
||||
//test plus
|
||||
// test plus
|
||||
cash.plus(4);
|
||||
assertEquals(7, cash.count());
|
||||
//test minus
|
||||
// test minus
|
||||
cash = new Cash(8);
|
||||
assertTrue(cash.minus(5));
|
||||
assertEquals(3, cash.count());
|
||||
assertFalse(cash.minus(6));
|
||||
assertEquals(3, cash.count());
|
||||
//test update
|
||||
// test update
|
||||
cash.plus(5);
|
||||
assertTrue(cash.minus(5));
|
||||
assertEquals(3, cash.count());
|
||||
|
||||
Reference in New Issue
Block a user