Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
inventory-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
inventory-service
Commits
8c054aca
Commit
8c054aca
authored
May 05, 2021
by
Khai Yuan Liew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-55] Modify GET all test endpoint
parent
d205dffe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
ProductControllerTest.java
...um/ascend/inventory/controller/ProductControllerTest.java
+11
-2
No files found.
src/test/java/com/nisum/ascend/inventory/controller/ProductControllerTest.java
View file @
8c054aca
...
...
@@ -22,6 +22,7 @@ import org.springframework.web.reactive.function.client.WebClient;
import
java.util.List
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertNotNull
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertTrue
;
@ExtendWith
(
SpringExtension
.
class
)
...
...
@@ -46,8 +47,16 @@ class ProductControllerTest {
.
exchange
()
.
expectStatus
().
isOk
()
.
expectHeader
().
contentType
(
MediaType
.
APPLICATION_JSON_VALUE
)
.
returnResult
(
Product
.
class
)
.
getResponseBody
();
.
expectBodyList
(
Product
.
class
)
.
consumeWith
(
product
->{
List
<
Product
>
products
=
product
.
getResponseBody
();
products
.
forEach
(
p
->{
assertNotNull
(
p
.
getSku
());
assertNotNull
(
p
.
getUpc
());
System
.
out
.
println
(
"Product SKU: "
+
p
.
getSku
());
System
.
out
.
println
(
"Product UPC: "
+
p
.
getUpc
());
});
});
}
...
...
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