public async Task Should_Get_Product_Min_Max_Prices()
        {
            var getListResult = await _productViewAppService.GetListAsync(new GetProductListInput
            {
                StoreId = ProductsTestData.Store1Id
            });

            getListResult.Items.ShouldNotBeEmpty();

            var productDto = getListResult.Items.FirstOrDefault(x => x.Id == ProductsTestData.Product1Id);

            productDto.ShouldNotBeNull();
            productDto.MinimumPrice.ShouldBe(1m);
            productDto.MaximumPrice.ShouldBe(3m);

            var getResult = await _productViewAppService.GetAsync(ProductsTestData.Product1Id);

            getResult.ShouldNotBeNull();
            getResult.MinimumPrice.ShouldBe(1m);
            getResult.MaximumPrice.ShouldBe(3m);
        }
Beispiel #2
0
 public virtual Task <PagedResultDto <ProductViewDto> > GetListAsync(GetProductListInput input)
 {
     return(_service.GetListAsync(input));
 }