Пример #1
0
        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);
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }