示例#1
0
        public void SetEmployeeHandler_InitializeCurrentEmployeeViewModel_Correct()
        {
            var employeeViewModel = new EmployeeViewModel()
            {
                Id           = 4,
                DepartmentId = 4,
                IsNew        = true
            };

            _employeeDetailsViewModel.CurrentEmployeeViewModel = null;

            _employeeDetailsViewModel.SetEmployeeHandler(employeeViewModel);

            Assert.IsTrue(_employeeDetailsViewModel.IsEditingEmployee);
            Assert.That(_employeeDetailsViewModel.CurrentEmployeeViewModel.Id, Is.EqualTo(employeeViewModel.Id));
        }