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
b9cc6a02
Commit
b9cc6a02
authored
May 06, 2021
by
John Lam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error message in test and changed model variable names
parent
be80c860
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
ProductDto.java
src/main/java/com/nisum/ascend/inventory/dto/ProductDto.java
+1
-1
Product.java
src/main/java/com/nisum/ascend/inventory/model/Product.java
+6
-6
ProductControllerTest.java
...um/ascend/inventory/controller/ProductControllerTest.java
+1
-1
No files found.
src/main/java/com/nisum/ascend/inventory/dto/ProductDto.java
View file @
b9cc6a02
...
@@ -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
.
getProd
Name
(),
product
.
getProdDesc
(),
product
.
getPrice
(),
product
.
getProdImg
Url
(),
product
.
getBrand
(),
product
.
getCategory
(),
product
.
getAvailableStock
(),
promotion
);
return
new
ProductDto
(
product
.
getSku
(),
product
.
getUpc
(),
product
.
getProd
uctName
(),
product
.
getProductDescription
(),
product
.
getPrice
(),
product
.
getProductImage
Url
(),
product
.
getBrand
(),
product
.
getCategory
(),
product
.
getAvailableStock
(),
promotion
);
}
}
}
}
src/main/java/com/nisum/ascend/inventory/model/Product.java
View file @
b9cc6a02
...
@@ -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
prod
uct
Name
;
private
String
prod
Desc
;
private
String
prod
uctDescription
;
private
float
price
;
private
float
price
;
private
int
availableStock
;
private
int
availableStock
;
private
int
blockedStock
;
private
int
blockedStock
;
private
String
prod
Img
Url
;
private
String
prod
uctImage
Url
;
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
.
prod
Name
=
prodName
;
this
.
prod
uctImageUrl
=
prodName
;
this
.
prod
Desc
=
prodDesc
;
this
.
prod
uctDescription
=
prodDesc
;
this
.
price
=
price
;
this
.
price
=
price
;
this
.
availableStock
=
availableStock
;
this
.
availableStock
=
availableStock
;
this
.
blockedStock
=
0
;
this
.
blockedStock
=
0
;
this
.
prod
Img
Url
=
prodImgUrl
;
this
.
prod
uctImage
Url
=
prodImgUrl
;
this
.
brand
=
brand
;
this
.
brand
=
brand
;
this
.
category
=
category
;
this
.
category
=
category
;
}
}
...
...
src/test/java/com/nisum/ascend/inventory/controller/ProductControllerTest.java
View file @
b9cc6a02
...
@@ -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
().
is
Accepted
()
.
expectStatus
().
is
Ok
()
.
expectBody
()
.
expectBody
()
.
jsonPath
(
"$.sku"
,
sku
);
.
jsonPath
(
"$.sku"
,
sku
);
}
}
...
...
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