public void ShouldUpdateExistentProduct() { var createdProduct = CreateNewProduct(); UpdateProduct updateProduct = new UpdateProduct(); createdProduct.Name = "Updated"; updateProduct.InputArgument = createdProduct; updateProduct.Execute(); CommitDatabaseChanges.Commit(); GetProduct getProduct = new GetProduct(); getProduct.InputArgument = p => p.Name == "Updated"; getProduct.Execute(); Assert.IsTrue(getProduct.OutputArgument.Count > 0); }
public void CleanChanges() { GetProduct getProduct = new GetProduct(); getProduct.InputArgument = p => p.Code.Contains("product code"); getProduct.Execute(); if (getProduct.OutputArgument != null) { foreach (var item in getProduct.OutputArgument) { RemoveProduct removeProduct = new RemoveProduct(); removeProduct.InputArgument = item; removeProduct.Execute(); } } CommitDatabaseChanges.Commit(); }