Пример #1
0
        public void SaveProduct_CreatesNewProduct()
        {
            InjectTestProductData();
            _presenter.SaveProduct();
            var products = TestDbContext.Instance.Products.ToList();

            Assert.AreEqual(1, products.Count);

            var savedProduct = products.First();

            Assert.AreEqual(_testProduct.Name, savedProduct.Name);
            Assert.AreEqual(_testProduct.Code, savedProduct.Code);
        }
Пример #2
0
 private void ButtonSave_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     presenter.SaveProduct();
 }