Commit cf662a4e authored by Karel Frajták's avatar Karel Frajták
Browse files

Merge branch 'Ukol1' into 'master'

Get items test

See merge request !1
parents a3e3b5b3 db9afc0a
Pipeline #672 passed with stage
in 28 seconds
......@@ -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());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment