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

Ian Packer
15.55.2015 f16f71611a4a5f48e97f843ea22e465be8e9a2f4
CR-7233: Additional test to cover OPENDJ-1797 in the SDK-based entry validation
1 files modified
22 ■■■■■ changed files
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/EntrySchemaCheckingTestCase.java 22 ●●●●● patch | view | raw | blame | history
opendj-sdk/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.
     *