|
@ -44,6 +44,18 @@ public class WarehouseTest extends TestCase { |
|
|
|
|
|
|
|
|
// Then |
|
|
// Then |
|
|
assertEquals(expectedSum, actualSumOfAllItems); |
|
|
assertEquals(expectedSum, actualSumOfAllItems); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void test_emptyWarehouse() { |
|
|
|
|
|
// Given |
|
|
|
|
|
Warehouse warehouse = new Warehouse(); |
|
|
|
|
|
|
|
|
|
|
|
// When |
|
|
|
|
|
int expectedSum = 0; |
|
|
|
|
|
|
|
|
|
|
|
// Then |
|
|
|
|
|
int actualSumOfAllItems = warehouse.getCountOfStock(); |
|
|
|
|
|
assertEquals(expectedSum, actualSumOfAllItems); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |