private void FormMain_Load(object sender, EventArgs e) { _presenter = new RegistrationPresenter(this); if (Initialize != null) Initialize(this, EventArgs.Empty); }
public void The_Attendee_should_be_saved() { MockView mockView = new MockView(); RegistrationPresenter _presenter = new RegistrationPresenter(mockView); mockView.RaiseRegisterUser(); Assert.AreEqual(true, mockView.RegistrationSuccessful); }
public void The_presenter_should_set_the_default_age() { MockView mockView = new MockView(); RegistrationPresenter _presenter = new RegistrationPresenter(mockView); mockView.RaiseInitialize(); Assert.AreEqual(5, mockView.Age); }
protected void Page_Load(object sender, EventArgs e) { _presenter = new RegistrationPresenter(this); if (!IsPostBack) { // Set the Focus to the First Name TextBox TextBoxFirstName.Focus(); if (Initialize != null) Initialize(this, EventArgs.Empty); } }