Examples of BooleanValue


Examples of com.groupon.jenkins.buildtype.install_packages.buildconfiguration.configvalue.BooleanValue

        assertEquals(ShellCommands.NOOP, new SkipSection(null).toScript(null));
    }

    @Test
    public void should_use_value_specified_as_boolean_value() {
        Assert.assertFalse(new SkipSection(new BooleanValue(false)).isSkipped());
    }
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

        assertEquals("[@unit]", error.getLocation());
        assertEquals(QuantityUnits.PIXELS, error.getInvalidValue());
        assertEquals(enumeratedConstraint, error.getConstraint());

        // invalid type
        BooleanValue booleanValue = VALUE_FACTORY.createBooleanValue();
        errors = quantityType.verify(booleanValue);
        assertEquals(1, errors.size());
        error = (VerificationError) errors.iterator().next();
        assertEquals(VerificationError.TYPE_INVALID_IMPLEMENTATION,
            error.getType());
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

            VALUE_FACTORY.createStructureValue();
        Collection errors = structureType.verify(structureValue);
        assertEquals(0, errors.size());

        // invalid type
        final BooleanValue booleanValue = VALUE_FACTORY.createBooleanValue();
        errors = structureType.verify(booleanValue);
        assertEquals(1, errors.size());
        VerificationError error =
            (VerificationError) errors.iterator().next();
        assertEquals(VerificationError.TYPE_INVALID_IMPLEMENTATION,
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

            VALUE_FACTORY.createChoiceValue();
        Collection errors = choiceType.verify(choiceValue);
        assertEquals(0, errors.size());

        // invalid type
        final BooleanValue booleanValue = VALUE_FACTORY.createBooleanValue();
        errors = choiceType.verify(booleanValue);
        assertEquals(1, errors.size());
        checkError(errors, "", VerificationError.TYPE_INVALID_IMPLEMENTATION,
                booleanValue, null);
    }
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

        assertEquals("", error.getLocation());
        assertEquals(stringValue, error.getInvalidValue());
        assertNull(error.getConstraint());

        // invalid type
        BooleanValue booleanValue = VALUE_FACTORY.createBooleanValue();
        errors = stringType.verify(booleanValue);
        assertEquals(1, errors.size());
        error = (VerificationError) errors.iterator().next();
        assertEquals(VerificationError.TYPE_INVALID_IMPLEMENTATION,
            error.getType());
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

            createCollectionValue(new String[]{"one", "two"});
        Collection errors = collectionType.verify(collectionValue);
        assertEquals(0, errors.size());

        // invalid type
        BooleanValue booleanValue = VALUE_FACTORY.createBooleanValue();
        errors = collectionType.verify(booleanValue);
        assertEquals(1, errors.size());
        VerificationError error =
            (VerificationError) errors.iterator().next();
        assertEquals(VerificationError.TYPE_INVALID_IMPLEMENTATION,
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

     */
    public void testMapOnlyStoresAllowableTypes() {
        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        String key = "key";

        BooleanValue allowableValue = (BooleanValue) f.getValueFactory()
            .createBooleanValue();
        Object forbiddenValue = new Integer(1);

        // create the map so that it only allows allowable values and keys
        TypedMap typedMap = createTypedMap(new HashMap(),
                                           allowableValue.getClass(), false);

        // test that we can add an allowable value with an allowable key
        try {
            typedMap.put(key, allowableValue);
        } catch (IllegalArgumentException e) {
            fail("Adding a " + allowableValue.getClass() + " value with a "
                 + key.getClass() + " key should be permitted.");
        }

        // test that we can not add a forbidden value with an allowable key
        try {
            typedMap.put(key, forbiddenValue);
            fail("Adding a forbidden value with an allowed key should not be " +
                 "permitted. Allowed value: " + allowableValue.getClass()
                 + " forbidden value : " + forbiddenValue.getClass());
        } catch (IllegalArgumentException e) {
            // expected
        }
    }
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

     */
    public void testContainsValueOnlyAcceptsAllowableValues() {
        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        String allowableKey = "key";

        BooleanValue allowableValue = (BooleanValue) f.getValueFactory()
            .createBooleanValue();
        Object forbiddenValue = new Integer(1);

        // create the map so that it only allows allowable values and keys
        TypedMap typedMap = createTypedMap(new HashMap(),
                                           allowableValue.getClass(), false);

        // test that we can add an allowable value with an allowable key
        try {
            typedMap.containsValue(allowableValue);
        } catch (IllegalArgumentException e) {
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

     */
    public void testContainsKeyOnlyAcceptsAllowableKeys() {
        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        String allowableKey = "key";

        BooleanValue allowableValue = (BooleanValue) f.getValueFactory()
            .createBooleanValue();
        Object forbiddenKey = new Integer(2);
        // create the map so that it only allows allowable values and keys
        TypedMap typedMap = createTypedMap(new HashMap(),
                                           allowableValue.getClass(), false);

        // test that we can add an allowable value with an allowable key
        try {
            typedMap.containsKey(allowableKey);
        } catch (IllegalArgumentException e) {
View Full Code Here

Examples of com.volantis.shared.metadata.value.BooleanValue

     */
    public void testRemoveAcceptsAllowableValues() {
        MetaDataFactory f = MetaDataFactory.getDefaultInstance();
        String allowableKey = "key";

        BooleanValue allowableValue = (BooleanValue) f.getValueFactory()
            .createBooleanValue();
        Object forbiddenValue = new Integer(1);
        // create the map so that it only allows allowable values and keys
        TypedMap typedMap = createTypedMap(new HashMap(),
                                           allowableValue.getClass(), false);

        typedMap.put(allowableKey, allowableValue);

        // test that we can add remove with an allowable value
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.