public void CanUpdateCustomer() { EditCustomerViewStub view = new EditCustomerViewStub(); EditCustomerPresenter presenter =new EditCustomerPresenter(view); presenter.InitViewWith(TestGlobals.TestCustomer.ID); presenter.Update(); }
public void CanInitView() { EditCustomerViewStub view = new EditCustomerViewStub(); EditCustomerPresenter presenter = new EditCustomerPresenter(view); view.AttachPresenter(presenter); presenter.InitViewWith(TestGlobals.TestCustomer.ID); Assert.AreEqual(TestGlobals.TestCustomer.ID, view.Customer.ID); Assert.AreEqual(TestGlobals.TestCustomer.CompanyName, view.Customer.CompanyName); Assert.AreEqual(TestGlobals.TestCustomer.ContactName, view.Customer.ContactName); }
private void InitEditCustomerView() { presenter = new EditCustomerPresenter(this); ctrlEditCustomerView.AttachPresenter(presenter); // Listen for events coming from the view ctrlEditCustomerView.UpdateCompleted += HandleUpdateCompleted; ctrlEditCustomerView.UpdateCancelled += HandleUpdateCancelled; if (!IsPostBack) { presenter.InitViewWith(CustomerId); } }