public void AddEmployee_ValidEmployee_CallsEmployeeHandler()
        {
            //Arrange
            var employee = new Employee {
                Id = "1", Name = "Foo", Email = "Bar", Gender = "Male", Status = "Active"
            };
            var employeeHandlerMock = new Mock <IEmployeeHandler>();

            employeeHandlerMock.Setup(m => m.CreateEmployee(employee)).Returns(Task.FromResult("Create successful"));
            var viewModel = new EmployeeViewModel(employeeHandlerMock.Object, null);

            viewModel.SelectedEmployee = employee;

            //Act
            viewModel.AddEmployee();

            employeeHandlerMock.Verify(m => m.CreateEmployee(employee), Times.Once);
            Assert.That(viewModel.Status, Is.EqualTo("Create successful"));
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     errorBlock.Text = employeeViewModel.AddEmployee(NameBox.Text, SalaryBox.Text, (string)title.SelectedValue);
 }