Example #1
0
        public void TestMappingForEmployeeLicenseEntityIsInputIsEmpty()
        {
            var mapper     = new EmployeeMapper();
            var mappedData = mapper.MapLicense(null);

            Assert.NotNull(mappedData);
        }
Example #2
0
        public void TestMappingForEmployeeLicenseEntity()
        {
            var mapper     = new EmployeeMapper();
            var mappedData = mapper.MapLicense(_employees);

            Assert.NotNull(mappedData);
            Assert.AreEqual(3, mappedData.Count);
            Assert.AreEqual("PersonNumber", mappedData[0].Person.PersonNumber);
            Assert.AreEqual(true, mappedData[0].ActiveFlag);
            Assert.AreEqual("LicenseTypeName", mappedData[0].LicenseTypeName);
            Assert.AreEqual("FirstName", mappedData[0].Person.FirstName);
            Assert.AreEqual("LastName", mappedData[0].Person.LastName);

            Assert.AreEqual("PersonNumber2", mappedData[1].Person.PersonNumber);
            Assert.AreEqual(false, mappedData[1].ActiveFlag);
            Assert.AreEqual("LicenseTypeName2", mappedData[1].LicenseTypeName);
            Assert.AreEqual("FirstName2", mappedData[1].Person.FirstName);
            Assert.AreEqual("LastName2", mappedData[1].Person.LastName);

            Assert.AreEqual("PersonNumber2", mappedData[2].Person.PersonNumber);
            Assert.AreEqual(true, mappedData[2].ActiveFlag);
            Assert.AreEqual("LicenseTypeName2_2", mappedData[2].LicenseTypeName);
            Assert.AreEqual("FirstName2", mappedData[2].Person.FirstName);
            Assert.AreEqual("LastName2", mappedData[2].Person.LastName);
        }