public void TestAddIsCalledOnce() { HomeService service = new HomeService(_homeQueryMock.Object); List <Product> products = service.Add(It.IsAny <Product>()); _homeQueryMock.Verify(h => h.Add(It.IsAny <Product>()), Times.Once); }
public void TestAddReturnsTrue() { HomeService service = new HomeService(_homeQueryMock.Object); Product p = service.Add(It.IsAny <Product>()); p.Status.Should().Be("Added"); }