public async Task TestEmployeePrensenterGetListAsync() { FakeEmployeeView fakeEmployeeView = new FakeEmployeeView(); EmployeePresenter employeePresenter = new EmployeePresenter(fakeEmployeeView); await employeePresenter.GetEmployeeListAsync(null); var Items = fakeEmployeeView.DataGridViewItems; Assert.IsNotNull(Items); }
public async Task TestEmployeePrensenterGetEmployeeAsync() { FakeEmployeeView fakeEmployeeView = new FakeEmployeeView(); EmployeePresenter employeePresenter = new EmployeePresenter(fakeEmployeeView); await employeePresenter.GetEmployeeListAsync(null); var Items = (fakeEmployeeView.DataGridViewItems as IEnumerable <EmployeeModel>); fakeEmployeeView.IdText = Items.FirstOrDefault().id.ToString(); await employeePresenter.GetEmployeeAsync(); Assert.AreEqual(fakeEmployeeView.EmailText, Items.FirstOrDefault().email); }