Ejemplo n.º 1
0
        public void model_save_method_is_not_called_if_product_exists()
        {
            var product = new Product {
                Code = "A1", Description = "A1 Desc", Price = 1.0
            };

            mockProductModel.Stub(p => p.ProductExists(product)).IgnoreArguments().Return(true);

            RaiseAddButtonPressed(product);

            mockProductModel.AssertWasNotCalled(m => m.Save(product));
        }