Skip to content

Conversation

@KaranChadha10
Copy link

@KaranChadha10 KaranChadha10 commented Apr 12, 2025

Description

This PR contains the following points:

@KaranChadha10 KaranChadha10 mentioned this pull request Apr 12, 2025
Copy link
Member

@hishamco hishamco left a 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
);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var result = await controller.GetProducts(warehouseId, smartTableParam);

// Assert
// Assert.IsType<ActionResult>(result);
Copy link
Member

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 };

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_stockRepositoryMock.Object,
_stockServiceMock.Object
);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Comment on lines +97 to +98

// Add more test cases as needed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Add more test cases as needed
var warehouseRepositoryMock = new Mock<IRepository<Warehouse>>();
var addressRepositoryMock = new Mock<IRepository<Address>>();
var workContextMock = new Mock<IWorkContext>();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

var controller = new WarehouseApiController(warehouseRepositoryMock.Object, workContextMock.Object, addressRepositoryMock.Object);

// Act
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants