| Summary: | Exception Not Handled: Negative value volume of an item | ||
|---|---|---|---|
| Product: | Warehouse Management System | Reporter: | Nurs <nzakirov2-c> |
| Component: | Testing | Assignee: | ANIRUDH <pvsatavva2-c> |
| Status: | CONFIRMED --- | ||
| Severity: | enhancement | CC: | nzakirov2-c |
| Priority: | --- | ||
| Version: | Specified | ||
| Hardware: | PC | ||
| OS: | Windows | ||
Note: The given problem is for Version 2. Steps to reproduce: 1. Initialize the warehouse 2. Add slots to the warehouse instance 3. Add an item with a negative value volume. The test case given below demonstrates the current bug. When we try to add an item with a negative value volume, the program should deny the request. In reality, the program accepts the item and places it into the slot. @Test void testMoveToSlot_09() { Warehouse wh = Warehouse.getInstance(); ArrayList<Slot> slots = new ArrayList<>(); slots.add(new Slot(1)); slots.add(new Slot(2)); slots.add(new Slot(3)); slots.add(new Slot(4)); slots.add(new Slot(5)); wh.setSlots(slots); Item item1 = new Item(1,new Day("13-Oct-2020"),new Day("20-Oct-2020")); Item item2 = new Item(2,new Day("13-Oct-2020"),new Day("20-Oct-2020")); Item item3 = new Item(3,new Day("13-Oct-2020"),new Day("20-Oct-2020")); Item newItem = new Item(-2,new Day("13-Oct-2020"),new Day("23-Oct-2020")); boolean result = wh.testResult(); String msg = "Checking when the size of an item is negative"; assertEquals(false, result, msg); }