示例#1
0
        public void should_return_all_commodities()
        {
            var commodities = new List <Commodity> {
                new() { Id = 1, Title = "book" }
            };

            _commodityRepo.GetAll().Returns(commodities);

            _commodityService.GetAllCommodities().Should().BeEquivalentTo(commodities);
        }
    }
示例#2
0
 public IEnumerable <Commodity> GetAllCommodities()
 {
     return(_commodityRepo.GetAll());
 }