public void TestAddSameNameOrganizationalUnitObject() { using (var organizationalUnitObject = ADObject.FindOneByDN(this.ADOperator, TF.GetConfig().Properties[ "SameOrganizationalUnitDN"]) as OrganizationalUnitObject) { if (organizationalUnitObject != null) { organizationalUnitObject.Delete(); } } using (var organizationalUnitObject = ADObject.FindOneByDN(this.ADOperator, TF.GetConfig().Properties["OrganizationalUnitDN"]) as OrganizationalUnitObject) { using (var addOrganizationalUnitObject = organizationalUnitObject.AddOrganizationalUnit(TF.GetConfig().Properties["SameOrganizationalUnitName"])) { Assert.AreEqual(TF.GetConfig().Properties["SameOrganizationalUnitDN"], addOrganizationalUnitObject.DistinguishedName); } } }