コード例 #1
0
        public async Task GetAllProducts_DefaultCall_ReturnAll()
        {
            // act
            var products = await _productCoreService.GetAllProducts();

            // assert
            Assert.Equal(10, products.Count);
        }
コード例 #2
0
        public async Task <List <ProductViewModel> > GetAllProducts()
        {
            var products = await _productCoreService.GetAllProducts();

            return(products.Select(x => _mapper.Map <ProductDto, ProductViewModel>(x)).ToList());
        }