public async Task GetListAsync_Should_returnProductsList() { var input = new PagedProductRequestDto(); var result = await _productAppService.GetListAsync(input); result.Items.Count.ShouldBeGreaterThanOrEqualTo(0); result.Items.ShouldNotBeEmpty(nameof(ProductDto.CategoryName)); result.Items.ShouldNotBeEmpty(nameof(ProductDto.GigName)); }
public async Task GetListAsync_WhenFilteredByCategory_ShouldReturnFilteredList() { var input = new PagedProductRequestDto { CategoryId = Guid.Parse(Zero1FiveTestData.CategoryId) }; var result = await _productAppService.GetListAsync(input); result.Items.Count.ShouldBeGreaterThanOrEqualTo(1); result.Items.ShouldContain(x => x.CategoryId == input.CategoryId); }
public async Task GetListAsync_WhenFilteredByKeyword_ShouldReturnFilteredList() { var input = new PagedProductRequestDto { Filter = "1" }; var result = await _productAppService.GetListAsync(input); result.Items.Count.ShouldBeGreaterThanOrEqualTo(1); result.Items.ShouldContain(x => x.Title.Contains(input.Filter)); }