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
4b8d1bfb
Commit
4b8d1bfb
authored
May 06, 2021
by
John Lam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull from dev and fix merge conflicts
parent
814be431
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
ProductController.java
.../nisum/ascend/inventory/controller/ProductController.java
+1
-0
ProductControllerTest.java
...um/ascend/inventory/controller/ProductControllerTest.java
+3
-3
No files found.
src/main/java/com/nisum/ascend/inventory/controller/ProductController.java
View file @
4b8d1bfb
...
...
@@ -26,6 +26,7 @@ public class ProductController {
Mono
<
ProductDto
>
monoProd
=
productService
.
getProductBySku
(
sku
);
HttpStatus
status
=
monoProd
!=
null
?
HttpStatus
.
OK
:
HttpStatus
.
NOT_FOUND
;
return
new
ResponseEntity
<>(
monoProd
,
status
);
}
@GetMapping
()
public
ResponseEntity
<
Flux
<
ProductDto
>>
getAllProducts
()
{
...
...
src/test/java/com/nisum/ascend/inventory/controller/ProductControllerTest.java
View file @
4b8d1bfb
...
...
@@ -44,7 +44,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
class
ProductControllerTest
{
@Autowired
private
WebTestClient
c
lient
;
private
WebTestClient
webTestC
lient
;
@BeforeEach
...
...
@@ -54,7 +54,7 @@ class ProductControllerTest {
@Test
void
testProductInvalidSkuNotFound
()
{
c
lient
webTestC
lient
.
get
()
.
uri
(
"/api/products/"
.
concat
(
"{sku}"
),
"invalid"
)
.
exchange
()
...
...
@@ -66,7 +66,7 @@ class ProductControllerTest {
void
testProductBySkuFound
()
{
String
sku
=
"000001"
;
c
lient
.
get
()
webTestC
lient
.
get
()
.
uri
(
"/api/products/"
.
concat
(
"/{sku}"
),
sku
)
.
exchange
()
.
expectStatus
()
...
...
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