Exemple #1
0
        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);
        }
Exemple #2
0
        public void TestAddReturnsTrue()
        {
            HomeService service = new HomeService(_homeQueryMock.Object);
            Product     p       = service.Add(It.IsAny <Product>());

            p.Status.Should().Be("Added");
        }