Beispiel #1
0
        public void SurreyDepartmentSuffixIsRemovedFromName()
        {
            var user = new ActiveDirectoryUser()
            {
                Name = "John Smith BUS"
            };
            var transformer = new OrbisPartnersDataTransformer();

            transformer.TransformUser(user);

            Assert.AreEqual("John Smith", user.Name);
        }
Beispiel #2
0
        public void SurreyEmailIsSurreyCountyCouncil()
        {
            var user = new ActiveDirectoryUser()
            {
                Mail = "*****@*****.**", Company = String.Empty
            };
            var transformer = new OrbisPartnersDataTransformer();

            transformer.TransformUser(user);

            Assert.AreEqual("Surrey County Council", user.Company);
        }
Beispiel #3
0
        public void EsccIsEastSussexCountyCouncil()
        {
            var user = new ActiveDirectoryUser()
            {
                Company = "ESCC"
            };
            var transformer = new OrbisPartnersDataTransformer();

            transformer.TransformUser(user);

            Assert.AreEqual("East Sussex County Council", user.Company);
        }
Beispiel #4
0
        public void ValidPhoneNumberIsUnaltered()
        {
            var user = new ActiveDirectoryUser()
            {
                TelephoneNumber = "01234 456789"
            };
            var transformer = new OrbisPartnersDataTransformer();

            transformer.TransformUser(user);

            Assert.AreEqual("01234 456789", user.TelephoneNumber);
        }
Beispiel #5
0
        public void PhoneNumberPunctuationIsRemoved()
        {
            var user = new ActiveDirectoryUser()
            {
                TelephoneNumber = "(01234) 456789"
            };
            var transformer = new OrbisPartnersDataTransformer();

            transformer.TransformUser(user);

            Assert.AreEqual("01234 456789", user.TelephoneNumber);
        }
Beispiel #6
0
        public void SurreyNoPhoneNumberTextIsRemoved(string phoneNumber)
        {
            var user = new ActiveDirectoryUser()
            {
                TelephoneNumber = phoneNumber
            };
            var transformer = new OrbisPartnersDataTransformer();

            transformer.TransformUser(user);

            Assert.IsEmpty(user.TelephoneNumber);
        }
Beispiel #7
0
        public void OldEsccDepartmentsAreUpdated(string oldDepartment, string newDepartment)
        {
            var user = new ActiveDirectoryUser()
            {
                Company = "East Sussex County Council", Department = oldDepartment
            };
            var transformer = new OrbisPartnersDataTransformer();

            transformer.TransformUser(user);

            Assert.AreEqual(newDepartment, user.Department);
        }