public void PageLoad() { this._ProjectId = 1; _.Mockery mockery = new _.Mockery(); ITimeSheetView mockView = this.GetMockView(mockery); // IHour mockHour = this.GetMockHour(mockery); IHour mockHour = null; IProject mockProject = this.GetMockProject(mockery); TimeSheetPresenter p = new TimeSheetPresenter(mockView, mockHour, mockProject); p.PageLoad(null, null); this.PageLoadAssertions(); mockery.VerifyAllExpectationsHaveBeenMet(); }
private void AddNew() { _.Mockery mockery = new _.Mockery(); ITimeSheetView mockView = this.GetMockView_AddNew(mockery); IHour mockHour = this.GetMockHours_AddNew(mockery); IProject mockProject = this.GetMockProject_AddNew(mockery); TimeSheetPresenter p = new TimeSheetPresenter(mockView, mockHour, mockProject); p.Edit(null, null); Assert.That(this._txtProject.Text, Is.Empty, "Need to clear out the Project Text Box so the same name doesn't get added twice"); mockery.VerifyAllExpectationsHaveBeenMet(); }