public void AddAndDeleteNewOuSubmitChangesTest() { using (var context = new DirectoryContextMock(ConnectionString, Username, Password)) { var ou = new OU { Name = "ChildOU" }; ou.SetParent(context.OrganizationUnits.First(u => u.Name == "TestOU")); context.AddObject(ou); context.SubmitChanges(); var childOu = context.OrganizationUnits.First(u => u.Name == "ChildOU"); context.DeleteObject(childOu); context.SubmitChanges(); } }