コード例 #1
0
ファイル: ProductTests.cs プロジェクト: lucasbarbosa/test-c
        public void Product_Delete_False()
        {
            // Arrange
            var notificator        = new Mock <INotificator>();
            var productRepository  = new Mock <IProductRepository>();
            var productApplication = new ProductApplication(notificator.Object, productRepository.Object);
            var productFake        = NewProduct();

            productRepository.Setup(x => x.DeleteBySku(productFake.Sku)).Returns(false);

            // Act
            var productResponse = productApplication.DeleteBySku(productFake.Sku);

            // Assert
            Assert.False(productResponse);
        }