Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         _presenter.OnViewInitialized();
     }
     _presenter.OnViewLoaded();
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         _presenter.OnViewInitialized();
     }
     _presenter.OnViewLoaded();
     apptDetails.Ubrn = _currentAppointment.UBRN;
     SetCreateButtonVisibility();
 }
        public void OnViewInitializedCallsControllerFundsTransferComplete()
        {
            MockEFTController    controller = new MockEFTController();
            SummaryViewPresenter presenter  = new SummaryViewPresenter(controller);
            MockSummaryView      view       = new MockSummaryView();

            presenter.View = view;

            presenter.OnViewInitialized();

            Assert.IsTrue(controller.FundsTransferCompleteCalled);
        }
        public void OnViewInitializedCallsControllerGetTransfersAndSetsTransfersInView()
        {
            MockEFTController controller = new MockEFTController();
            Transfer          transfer   = new Transfer();

            controller.Transfers = new Transfer[] { transfer };
            SummaryViewPresenter presenter = new SummaryViewPresenter(controller);
            MockSummaryView      view      = new MockSummaryView();

            presenter.View = view;

            presenter.OnViewInitialized();

            Assert.IsTrue(controller.GetTransfersCalled);
            Assert.IsTrue(view.TransfersSet);
            Assert.AreEqual(1, view.Transfers.Length);
            Assert.AreSame(transfer, view.Transfers[0]);
        }