Пример #1
0
        public async Task TestEmployeePrensenterGetListAsync()
        {
            FakeEmployeeView  fakeEmployeeView  = new FakeEmployeeView();
            EmployeePresenter employeePresenter = new EmployeePresenter(fakeEmployeeView);

            await employeePresenter.GetEmployeeListAsync(null);

            var Items = fakeEmployeeView.DataGridViewItems;

            Assert.IsNotNull(Items);
        }
Пример #2
0
        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);
        }