public void EmployeeGridList_Has_Data() { IVitalsView view = new MockVitalsView(); IEmployeeData data = new MockEmployeeData(); var presenter = new VitalsPresenter(view, data); Assert.IsTrue(presenter.GetEmployeeGridList().Count > 0); }
public void Initialize_View() { var view = new MockVitalsView(); IEmployeeData data = new MockEmployeeData(); var presenter = new VitalsPresenter(view, data); presenter.Initialize(); Assert.Greater(presenter.GetEmployeeGridList().Count, 1); }
public void Display_No_Message_When_User_Is_Selected_In_Dropdown() { var view = new MockVitalsView(); IEmployeeData data = new MockEmployeeData(); var presenter = new VitalsPresenter(view, data); view.EmployeeId = "1"; presenter.RefreshGridView(); Assert.AreEqual(view.ErrorMessage, string.Empty); }
public void Username_Returned_Is_CSmith() { IHeaderView view = new MockHeaderView(); IEmployeeData data = new MockEmployeeData(); var presenter = new HeaderPresenter(view, data); var userInfo = data.GetEmployeeListById(2); foreach (var item in userInfo) { view.Username = item.Username; } Assert.AreEqual("CSmith", view.Username); }
public void Search_EmployeeList_By_Id_Returns_Charles_Smith() { IVitalsView view = new MockVitalsView(); IEmployeeData data = new MockEmployeeData(); var presenter = new VitalsPresenter(view, data); List <Employee> emp = presenter.GetEmployeeGridListById(2); string fullName = string.Empty; foreach (var item in emp) { fullName = item.FullName; } Assert.AreEqual("Smith, Charles", fullName); }