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

Nicolas Capponi
02.33.2014 e114a899bbc0df59f5135f195d24797bf6c1b778
opendj-sdk/opendj-admin/src/test/java/org/opends/server/admin/BooleanPropertyDefinitionTest.java
@@ -40,20 +40,19 @@
    @BeforeClass
    public void setUp() throws Exception {
        disableClassValidationForProperties();
        builder = BooleanPropertyDefinition.createBuilder(RootCfgDefn.getInstance(), "test-property");
    }
    @Test
    public void testValidateValue() {
        BooleanPropertyDefinition def = createPropertyDefinition();
        def.validateValue(Boolean.TRUE);
        def.validateValue(Boolean.TRUE, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
    }
    @Test(expectedExceptions = NullPointerException.class)
    public void testValidateValueIllegal() {
        BooleanPropertyDefinition def = createPropertyDefinition();
        def.validateValue(null);
        def.validateValue(null, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
    }
    @DataProvider(name = "decodeValueData")
@@ -64,7 +63,7 @@
    @Test(dataProvider = "decodeValueData")
    public void testDecodeValue(String value, Boolean expected) {
        BooleanPropertyDefinition def = createPropertyDefinition();
        assertEquals(def.decodeValue(value), expected);
        assertEquals(def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS), expected);
    }
    @DataProvider(name = "decodeValueDataIllegal")
@@ -76,7 +75,7 @@
            IllegalPropertyValueStringException.class })
    public void testDecodeValueIllegal(String value) {
        BooleanPropertyDefinition def = createPropertyDefinition();
        def.decodeValue(value);
        def.decodeValue(value, PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
    }
    private BooleanPropertyDefinition createPropertyDefinition() {