Пример #1
0
        public async Task GetProductById_PassExsistingId_ReturnProduct()
        {
            // act
            var product = await _productCoreService.GetProductById(1);

            // assert
            Assert.Equal(1, product.Id);
        }
Пример #2
0
        public async Task <ProductViewModel> GetProduct(int id)
        {
            ValidateProductId(id);
            var product = await _productCoreService.GetProductById(id);

            return(_mapper.Map <ProductDto, ProductViewModel>(product));
        }