diff --git a/src/test/java/OrderTest.java b/src/test/java/OrderTest.java index a8e63133da330823eca65e2fb22688c0944db092..0400d2943a15adf187ff1d5631e038abea5bae58 100644 --- a/src/test/java/OrderTest.java +++ b/src/test/java/OrderTest.java @@ -6,6 +6,7 @@ import cz.cvut.eshop.shop.Order; import cz.cvut.eshop.shop.ShoppingCart; +import cz.cvut.eshop.shop.StandardItem; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -28,4 +29,15 @@ public class OrderTest { order.create(); // assert } + + @Test + public void itemsPassedCanBeRead() { + // setup + ShoppingCart cart = new ShoppingCart(); + cart.addItem(new StandardItem(0, "", 0, "", 0)); + Order order = new Order(cart, 0); + // act + // assert + assertEquals(1, order.getItems().size()); + } }