Commit d2d78b83 authored by John Lam's avatar John Lam

fixed exception and test exception

parent 077d16b0
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;
......
......@@ -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()
.is5xxServerError();
.isNotFound();
}
@Test
......
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