public void UpdateStock(Product product) { if (product.StockLevel > 0) { _pusher.Trigger(String.Format("product-{0}", product.Id), "StockUpdated", product); } }
public void Product_Unavailable_ReturnOutOfStock() { //Arrange _product = new Product() { StockLevel = 0 }; //Act //Assert Assert.AreEqual(_product.StockStatus, "Out of Stock"); }
public void Product_Available_ReturnInStock() { //Arrange _product = new Product() { StockLevel = 1 }; //Act //Assert Assert.AreEqual(_product.StockStatus, "In Stock"); }
public void CreateProduct(Product product) { _documentSession.Store(product); }
public void Init() { _availableProduct = new Product { Description = "UpdateStock_AvailableProduct_CallsPusher description", Id = "1", StockLevel = 10, Title = "UpdateStock_AvailableProduct_CallsPusher Title" }; _unavailableProduct = new Product { Description = "UpdateStock_AvailableProduct_CallsPusher description", Id = "1", StockLevel = 0, Title = "UpdateStock_AvailableProduct_CallsPusher Title" }; _productRepositoryMock = new Mock<IProductRepository>(); AutomapperConfig.RegisterMappings(); }
public void Dispose() { _availableProduct = null; _unavailableProduct = null; _productRepositoryMock = null; }
public void Init() { _product = new Product { Description = "Product_Available_ReturnInStock description", Id = "1", StockLevel = 10, Title = "Product_Available_ReturnInStock Title" }; _documentSessionMock = new Mock<IDocumentSession>(); }
public void Dispose() { _product = null; }
public void CreateProduct(Product product) { _productRepository.CreateProduct(product); }
public void Dispose() { _availableProduct = null; _pusherMock = null; _pusherProviderMock = null; }