mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Ian Packer
15.55.2015 32ad9b1a1e5f14a05dbc04df51cf75b108cd6f99
CR-7233: Additional test to cover OPENDJ-1797 in the SDK-based entry validation
1 files modified
22 ■■■■■ changed files
opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java 22 ●●●●● patch | view | raw | blame | history
opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java
@@ -924,6 +924,28 @@
    }
    /**
     * Tests schema checking for an entry that contains an undefined objectclass
     * when there is no structural objectclass and no structural objectclass checking.
     *
     * @throws Exception
     *             If an unexpected problem occurs.
     */
    @Test
    public void testUndefinedObjectClassNoStructural() throws Exception {
        // @formatter:off
        final Entry e = newEntry(
                "dn: o=test",
                "objectClass: top",
                "objectClass: xxxundefinedxxx");
        // @formatter:on
        assertDoesNotConformToSchema(e, defaultPolicy().requireSingleStructuralObjectClass(Action.IGNORE));
        e.removeAttribute("objectClass", "xxxundefinedxxx");
        assertConformsToSchema(e, defaultPolicy().requireSingleStructuralObjectClass(Action.IGNORE));
    }
    /**
     * Tests schema checking for an entry with a valid single structural
     * objectclass.
     *