Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Jan Novák
eShop
Commits
cf662a4e
Commit
cf662a4e
authored
Nov 30, 2017
by
Karel Frajták
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Ukol1' into 'master'
Get items test See merge request
frajtak/eShop!1
parents
a3e3b5b3
db9afc0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/test/java/OrderTest.java
src/test/java/OrderTest.java
+12
-0
No files found.
src/test/java/OrderTest.java
View file @
cf662a4e
...
...
@@ -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
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment