Exemple #1
0
        public void GetProduct()
        {
            var product = new ProductBuilder().GetProduct();

            _mockRepository.Setup(x => x.Get(1)).Returns(product);

            var productFromRepo = _service.Get(1);

            Assert.True(productFromRepo != null);
            Assert.Equal("Product 1", productFromRepo.Name);
        }