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
1.8.2: 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 0 and sweaterShipment is 5 :
Beginning tests.
UNIT TEST FAILED: addInventory()
Tests complete.
Note: UNIT TEST FAILED is preceded by 3 spaces.
Learn how our autograder works
5953543929544 q 32zq77
CHALLENGE ACTIVITY 1 . 8 . 2 : Unit testing of a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!