Commit 284bbe52 authored by Karel Frajtak's avatar Karel Frajtak
Browse files

Test

parents 23d69f17 cf662a4e
Pipeline #673 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;
......@@ -37,4 +38,15 @@ public class OrderTest {
// act
assertEquals(10, order.getState());
}
@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