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 {
// TODO: Fetch the product's promotion from the Promotions com.nisum.ascend.inventory.service
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 {
// @Indexed(name = "sku_index_unique", unique=true)
private String sku;
private String upc;
private String prodName;
private String prodDesc;
private String productName;
private String productDescription;
private float price;
private int availableStock;
private int blockedStock;
private String prodImgUrl;
private String productImageUrl;
private String brand;
private String category;
......@@ -30,12 +30,12 @@ public class Product {
String prodImgUrl, String brand, String category) {
this.sku = sku;
this.upc = upc;
this.prodName = prodName;
this.prodDesc = prodDesc;
this.productImageUrl = prodName;
this.productDescription = prodDesc;
this.price = price;
this.availableStock = availableStock;
this.blockedStock = 0;
this.prodImgUrl = prodImgUrl;
this.productImageUrl = prodImgUrl;
this.brand = brand;
this.category = category;
}
......
......@@ -43,7 +43,7 @@ class ProductControllerTest {
.contentType(MediaType.valueOf(MediaType.APPLICATION_JSON_VALUE))
.body(Mono.just(product), Product.class)
.exchange()
.expectStatus().isAccepted()
.expectStatus().isOk()
.expectBody()
.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