InventoryTest.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import static org.junit.Assert.*;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. /**
  6. * The test class InventoryTest.
  7. *
  8. * @author (your name)
  9. * @version (a version number or a date)
  10. */
  11. public class InventoryTest
  12. {
  13. /**
  14. * Default constructor for test class InventoryTest
  15. */
  16. public InventoryTest()
  17. {
  18. }
  19. /**
  20. * Sets up the test fixture.
  21. *
  22. * Called before every test case method.
  23. */
  24. @Before
  25. public void setUp()
  26. {
  27. }
  28. // @Test
  29. // public void testGetTotalQuantity(){
  30. // Inventory inventory = new Inventory();
  31. // Product tea = new Product (1,1.99,10);
  32. // Product coffee = new Product (9, 3.99, 5)
  33. // inventory.add(tea);
  34. // inventory.add(coffee);
  35. // int actualQuantity = inventory.getTotalQuantity();
  36. // int expectedQuanity = 15;
  37. // AssertEquals(expectedQuantity, actualQuantity);
  38. // }
  39. /**
  40. * Tears down the test fixture.
  41. *
  42. * Called after every test case method.
  43. */
  44. @After
  45. public void tearDown()
  46. {
  47. }
  48. }