-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
test: added warehouseProduct and warehouse tests #1129
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
test: added warehouseProduct and warehouse tests #1129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please convert this PR to draft; once it's complete, you can change it
_stockRepositoryMock.Object, | ||
_stockServiceMock.Object | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var result = await controller.GetProducts(warehouseId, smartTableParam); | ||
|
||
// Assert | ||
// Assert.IsType<ActionResult>(result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the assertion is disabled?
|
||
var warehouseId = 1; | ||
var productIds = new List<long> { 1, 2, 3 }; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_stockRepositoryMock.Object, | ||
_stockServiceMock.Object | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// Add more test cases as needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Add more test cases as needed |
var warehouseRepositoryMock = new Mock<IRepository<Warehouse>>(); | ||
var addressRepositoryMock = new Mock<IRepository<Address>>(); | ||
var workContextMock = new Mock<IWorkContext>(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
var controller = new WarehouseApiController(warehouseRepositoryMock.Object, workContextMock.Object, addressRepositoryMock.Object); | ||
|
||
// Act |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please complete the test
var controller = new WarehouseApiController(warehouseRepositoryMock.Object, workContextMock.Object, addressRepositoryMock.Object); | ||
var param = new SmartTableParam(); | ||
|
||
// Act |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
var controller = new WarehouseApiController(warehouseRepositoryMock.Object, workContextMock.Object, addressRepositoryMock.Object); | ||
var warehouseId = 1; | ||
|
||
// Act |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here ..
Description
This PR contains the following points:
Related PR : inventory test #1073