public void TestFindOneByCN()
 {
     using (var contactObject = ContactObject.FindOneByCN(this.ADOperator, this.ContactCN))
     {
         Assert.AreEqual(this.ContactDescription, contactObject.Description);
     }
 }
        public void TestChangeCN()
        {
            Guid   contactId = Guid.Empty;
            string newCN     = "pangcontactnew";

            using (var contactObject = ContactObject.FindOneByCN(this.ADOperator, this.ContactCN))
            {
                contactObject.CN = newCN;
                contactId        = contactObject.ObjectGuid;
                contactObject.Save();
            }
            using (var contactObject = ADObject.FindOneByObjectGUID(this.ADOperator, contactId))
            {
                Assert.AreEqual(newCN, contactObject.CN);
            }
            using (var contactObject = ContactObject.FindOneByCN(this.ADOperator, newCN))
            {
                contactObject.CN = this.ContactCN;
                contactObject.Save();
            }
        }