Пример #1
0
 public void SetUp()
 {
     ProductMock.Setup(x => x.GetFeaturedProducts())
     .Returns(Task.FromResult(ProductSamples.Featured));
     Assert.DoesNotThrow(() => _result = UnderTest.GetFeaturedProducts());
 }
Пример #2
0
 public void SetUp()
 {
     ProductMock.Setup(x => x.GetProductsByCategoryId(It.IsAny <int>()))
     .Returns(Task.FromResult(ProductSamples.OfCategory));
     Assert.DoesNotThrow(() => _result = UnderTest.GetProductsByCategoryId(1));
 }