Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public virtual Task <ProductViewDto> GetAsync(Guid id)
 {
     return(_service.GetAsync(id));
 }