The given unit test calls the add Inventory method on the Red Sweater object with an argument of 50 . The expected output is “Error: the subsequent quantity cannot be negative.
What is the Inventory ?Inventory, also known as stock or store, is the goods, materials and products that are on hand and available for sale, use or consumption. It is the physical material that is available for sale or use in the production of goods and services. Inventory is an important part of any business as it affects production, sales, cost of goods sold, and customer satisfaction. In order for a business to operate efficiently and effectively, it must maintain an accurate and up-to-date inventory of items.
public static void testAddInventory(){
int initialQuantity = 10;
int sweaterShipment = 50;
RedSweater redSweater = new RedSweater(initialQuantity);
try {
redSweater.addInventory(sweaterShipment);
} catch (Exception e) {
System.out.println("Error: the subsequent quantity cannot be negative");
}
}
To learn more about Inventory
https://brainly.com/question/26977216
#SPJ1