Commit b9cc6a02 authored by John Lam's avatar John Lam

fixed error message in test and changed model variable names

parent be80c860
...@@ -24,7 +24,7 @@ public class ProductDto { ...@@ -24,7 +24,7 @@ public class ProductDto {
// TODO: Fetch the product's promotion from the Promotions com.nisum.ascend.inventory.service // TODO: Fetch the product's promotion from the Promotions com.nisum.ascend.inventory.service
PromotionDto promotion = new PromotionDto(); PromotionDto promotion = new PromotionDto();
return new ProductDto(product.getSku(), product.getUpc(), product.getProdName(), product.getProdDesc(), product.getPrice(), product.getProdImgUrl(), product.getBrand(), product.getCategory(), product.getAvailableStock(), promotion); return new ProductDto(product.getSku(), product.getUpc(), product.getProductName(), product.getProductDescription(), product.getPrice(), product.getProductImageUrl(), product.getBrand(), product.getCategory(), product.getAvailableStock(), promotion);
} }
} }
...@@ -15,12 +15,12 @@ public class Product { ...@@ -15,12 +15,12 @@ public class Product {
// @Indexed(name = "sku_index_unique", unique=true) // @Indexed(name = "sku_index_unique", unique=true)
private String sku; private String sku;
private String upc; private String upc;
private String prodName; private String productName;
private String prodDesc; private String productDescription;
private float price; private float price;
private int availableStock; private int availableStock;
private int blockedStock; private int blockedStock;
private String prodImgUrl; private String productImageUrl;
private String brand; private String brand;
private String category; private String category;
...@@ -30,12 +30,12 @@ public class Product { ...@@ -30,12 +30,12 @@ public class Product {
String prodImgUrl, String brand, String category) { String prodImgUrl, String brand, String category) {
this.sku = sku; this.sku = sku;
this.upc = upc; this.upc = upc;
this.prodName = prodName; this.productImageUrl = prodName;
this.prodDesc = prodDesc; this.productDescription = prodDesc;
this.price = price; this.price = price;
this.availableStock = availableStock; this.availableStock = availableStock;
this.blockedStock = 0; this.blockedStock = 0;
this.prodImgUrl = prodImgUrl; this.productImageUrl = prodImgUrl;
this.brand = brand; this.brand = brand;
this.category = category; this.category = category;
} }
......
...@@ -43,7 +43,7 @@ class ProductControllerTest { ...@@ -43,7 +43,7 @@ class ProductControllerTest {
.contentType(MediaType.valueOf(MediaType.APPLICATION_JSON_VALUE)) .contentType(MediaType.valueOf(MediaType.APPLICATION_JSON_VALUE))
.body(Mono.just(product), Product.class) .body(Mono.just(product), Product.class)
.exchange() .exchange()
.expectStatus().isAccepted() .expectStatus().isOk()
.expectBody() .expectBody()
.jsonPath("$.sku", sku); .jsonPath("$.sku", sku);
} }
......
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