Question: CHALLENGE ACTIVITY 1 . 8 . 2 : Unit testing of a class. Write a unit test to show that the InventoryTag class method addinventory
CHALLENGE
ACTIVITY
: Unit testing of a class.
Write a unit test to show that the InventoryTag class method addinventory has an error. First, call redSweater.addInventory with sweaterShipment as the argument. Then, print the following error message if the updated quantity is not the sum of sweaterInventoryBefore and sweaterShipment. Sample output for failed unit test given sweaterInventoryBefore is and sweaterShipment is :
Beginning tests.
UNIT TEST FAILED: addInventory
Tests complete.
Note: UNIT TEST FAILED is preceded by spaces.
Learn how our autograder works
q
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
