Пример #1
0
        public void ShouldSaveOrderInControllerOnSave()
        {
            MockOrderGeneralInformation order = GetPopulatedDisplayOrder();

            view.Order = order;

            presenter.OnSave();

            Assert.IsTrue(controller.SaveCurrentOrderAsDraftCalled);
            Assert.IsFalse(controller.CurrentOrder.OrderId > 0);
            Assert.AreEqual(order.Approver, controller.CurrentOrder.Approver);
            Assert.AreEqual(order.Address, controller.CurrentOrder.ShipAddress);
            Assert.AreEqual(order.City, controller.CurrentOrder.ShipCity);
            Assert.AreEqual(order.State, controller.CurrentOrder.ShipRegion);
            Assert.AreEqual(order.OrderName, controller.CurrentOrder.OrderName);
            Assert.AreEqual(order.Description, controller.CurrentOrder.Description);
        }
 protected void SaveButton_Click(object sender, EventArgs e)
 {
     _presenter.OnSave();
 }