public void GetEmployeeData_StringABRAKADABRA_NothingFound() { //Arrange VisaRegistrationDateController target = new VisaRegistrationDateController(mock.Object, messengerMock.Object); // Act - call the action method var result = target.GetEmployeeData(mock.Object.Employees.ToList(), "ABRAKADABRA"); // Assert - check the result Assert.AreEqual(0, result.ToArray().Length); }
public void GetEmployeeData_String0801_SelectedEmployees() { //Arrange VisaRegistrationDateController target = new VisaRegistrationDateController(mock.Object, messengerMock.Object); // Act - call the action method var result = target.GetEmployeeData(mock.Object.Employees.ToList(), "8/1/2012"); // Assert - check the result Assert.AreEqual(1, result.ToArray().Length); Assert.AreEqual("Zarose", result.ToArray()[0].LastName); CollectionAssert.AllItemsAreInstancesOfType(result.ToList(), typeof(Employee)); }
public void GetEmployeeData_StringEmpty_AllEmployees() { //Arrange VisaRegistrationDateController target = new VisaRegistrationDateController(mock.Object, messengerMock.Object); // Act - call the action method var result = target.GetEmployeeData(mock.Object.Employees.ToList(), ""); // Assert - check the result Assert.AreEqual(24, result.ToArray().Length); Assert.AreEqual("Kowwood", result.ToArray()[0].LastName); Assert.AreEqual("Only", result.ToArray()[6].LastName); CollectionAssert.AllItemsAreInstancesOfType(result.ToList(), typeof(Employee)); }