Exemplo n.º 1
0
        public void ShouldRemoveProduct()
        {
            var createdProduct = CreateNewProduct();

            CommitDatabaseChanges.Commit();
            RemoveProduct removeProdct = new RemoveProduct();

            removeProdct.InputArgument = createdProduct;
            removeProdct.Execute();
            CommitDatabaseChanges.Commit();
            Assert.IsTrue(removeProdct.OutputArgument);
        }
Exemplo n.º 2
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();
        }