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
d2d78b83
Commit
d2d78b83
authored
May 06, 2021
by
John Lam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed exception and test exception
parent
077d16b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
ResourceNotFoundException.java
...ascend/inventory/exception/ResourceNotFoundException.java
+2
-0
ProductControllerTest.java
...um/ascend/inventory/controller/ProductControllerTest.java
+7
-1
No files found.
src/main/java/com/nisum/ascend/inventory/exception/ResourceNotFoundException.java
View file @
d2d78b83
package
com
.
nisum
.
ascend
.
inventory
.
exception
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
@ResponseStatus
(
value
=
HttpStatus
.
NOT_FOUND
)
public
class
ResourceNotFoundException
extends
Exception
{
HttpStatus
status
;
...
...
src/test/java/com/nisum/ascend/inventory/controller/ProductControllerTest.java
View file @
d2d78b83
...
...
@@ -32,6 +32,12 @@ class ProductControllerTest {
@Autowired
private
WebTestClient
client
;
@BeforeEach
public
void
setup
(){
}
@Test
void
testProductInvalidSkuNotFound
()
{
client
...
...
@@ -39,7 +45,7 @@ class ProductControllerTest {
.
uri
(
"/products/"
.
concat
(
"{sku}"
),
"invalid"
)
.
exchange
()
.
expectStatus
()
.
is
5xxServerError
();
.
is
NotFound
();
}
@Test
...
...
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