public void OnApproveAnotherCustomerCallsControllerApproveAnotherCustomer()
        {
            MockCustomersController controller = new MockCustomersController();
            SummaryViewPresenter presenter = new SummaryViewPresenter(controller);
            MockSummaryView view = new MockSummaryView();
            presenter.View = view;

            presenter.OnApproveAnotherCustomer();

            Assert.IsTrue(controller.ApproveAnotherCustomerCalled);
        }
        public void OnApproveAnotherCustomerCallsControllerApproveAnotherCustomer()
        {
            MockCustomersController controller = new MockCustomersController();
            SummaryViewPresenter    presenter  = new SummaryViewPresenter(controller);
            MockSummaryView         view       = new MockSummaryView();

            presenter.View = view;

            presenter.OnApproveAnotherCustomer();

            Assert.IsTrue(controller.ApproveAnotherCustomerCalled);
        }
        public void OnViewLoadedCallsControllerCurrentCustomerAndViewSetCustomer()
        {
            MockCustomersController controller = new MockCustomersController();
            Customer customer = controller.InnerCurrentCustomer = new Customer();
            SummaryViewPresenter presenter = new SummaryViewPresenter(controller);
            MockSummaryView view = new MockSummaryView();
            presenter.View = view;

            presenter.OnViewLoaded();

            Assert.IsTrue(controller.CurrentCustomerRetrieved);
            Assert.IsTrue(view.CustomerSet);
            Assert.AreSame(customer, view.Customer);
        }
        public void OnViewLoadedCallsControllerCurrentCustomerAndViewSetCustomer()
        {
            MockCustomersController controller = new MockCustomersController();
            Customer             customer      = controller.InnerCurrentCustomer = new Customer();
            SummaryViewPresenter presenter     = new SummaryViewPresenter(controller);
            MockSummaryView      view          = new MockSummaryView();

            presenter.View = view;

            presenter.OnViewLoaded();

            Assert.IsTrue(controller.CurrentCustomerRetrieved);
            Assert.IsTrue(view.CustomerSet);
            Assert.AreSame(customer, view.Customer);
        }