public void ShouldRemoveProduct() { var createdProduct = CreateNewProduct(); CommitDatabaseChanges.Commit(); RemoveProduct removeProdct = new RemoveProduct(); removeProdct.InputArgument = createdProduct; removeProdct.Execute(); CommitDatabaseChanges.Commit(); Assert.IsTrue(removeProdct.OutputArgument); }
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(); }