import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.util.List; /** * The test class InventoryTest. * * @author (your name) * @version (a version number or a date) */ public class InventoryTest{ @Test public void testAddinventory(){ Inventory inventory = new Inventory(); Product product = new Product(); inventory.add(product); List products = inventory.getProducts(); Product actualProduct = products.get(0); assertEquals (product, actualProduct); } @Test public void testTotalQuantity(){ Inventory inventory = new Inventory(); Product tea = new Product ("asdf", 44.43, 3); Product coffee = new Product("kedk", 234.88, 5); inventory.add(tea); inventory.add(coffee); int actualQuantity = inventory.getTotalQuantity(); int expectedQuantity = inventory.getTotalQuantity(); assertEquals(expectedQuantity, actualQuantity); } }