示例#1
0
        public void EmployeeTypeDAO_GetEmployeeByUserName_ReturnsCorrespondingEmployee()
        {
            Employee employee;

            employee = dao.GetEmployeeByUserName("*****@*****.**");
            Assert.IsNotNull(employee);
            Assert.AreEqual("*****@*****.**", employee.Username);
            Assert.AreEqual("Agent1", employee.Fullname);
            Assert.AreEqual(1, employee.DistributionCentreId);

            employee = dao.GetEmployeeByUserName("*****@*****.**");
            Assert.IsNotNull(employee);
            Assert.AreEqual("*****@*****.**", employee.Username);
            Assert.AreEqual("Doctor1", employee.Fullname);
            Assert.AreEqual(2, employee.DistributionCentreId);

            employee = dao.GetEmployeeByUserName("*****@*****.**");
            Assert.IsNull(employee);
        }