Package org.jboss.as.subsystem.test.ModelDescriptionValidator

Examples of org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration


    @Test
    public void testConfiguredAllowNullValueTypeForObject() {
        ModelNode description = createSubsystemSkeleton(ModelType.OBJECT, (ModelType)null);

        ValidationConfiguration arbitraryDescriptors = new ValidationConfiguration();
        arbitraryDescriptors.allowNullValueTypeForAttribute(ROOT_ADDRESS, ROOT_ATTR);
        arbitraryDescriptors.allowNullValueTypeForOperation(ROOT_ADDRESS, ROOT_OP);
        arbitraryDescriptors.allowNullValueTypeForAttribute(CHILD_ADDRESS, CHILD_ATTR);
        arbitraryDescriptors.allowNullValueTypeForOperation(CHILD_ADDRESS, CHILD_OP);

        List<ValidationFailure> errors = validate(description, arbitraryDescriptors);
        Assert.assertEquals(0, errors.size());
    }
View Full Code Here


    @Test
    public void testConfiguredAllowNullValueTypeForObjectParameter() {
        ModelNode description = createSubsystemSkeleton(ModelType.OBJECT, (ModelType)null);

        ValidationConfiguration arbitraryDescriptors = new ValidationConfiguration();
        arbitraryDescriptors.allowNullValueTypeForAttribute(ROOT_ADDRESS, ROOT_ATTR);
        arbitraryDescriptors.allowNullValueTypeForOperationParameter(ROOT_ADDRESS, ROOT_OP, PARAM);
        arbitraryDescriptors.allowNullValueTypeForAttribute(CHILD_ADDRESS, CHILD_ATTR);
        arbitraryDescriptors.allowNullValueTypeForOperationParameter(CHILD_ADDRESS, CHILD_OP, PARAM);

        List<ValidationFailure> errors = validate(description, arbitraryDescriptors);
        Assert.assertEquals(2, errors.size());
        assertOperationParameterFailure(errors.get(0), ROOT_ADDRESS, ROOT_OP, REPLY_PROPERTIES);
        assertOperationParameterFailure(errors.get(1), CHILD_ADDRESS, CHILD_OP, REPLY_PROPERTIES);
View Full Code Here

    @Test
    public void testConfiguredAllowNullValueTypeForObjectReplyProperties() {
        ModelNode description = createSubsystemSkeleton(ModelType.OBJECT, (ModelType)null);

        ValidationConfiguration arbitraryDescriptors = new ValidationConfiguration();
        arbitraryDescriptors.allowNullValueTypeForAttribute(ROOT_ADDRESS, ROOT_ATTR);
        arbitraryDescriptors.allowNullValueTypeForOperationReplyProperties(ROOT_ADDRESS, ROOT_OP);
        arbitraryDescriptors.allowNullValueTypeForAttribute(CHILD_ADDRESS, CHILD_ATTR);
        arbitraryDescriptors.allowNullValueTypeForOperationReplyProperties(CHILD_ADDRESS, CHILD_OP);

        List<ValidationFailure> errors = validate(description, arbitraryDescriptors);
        Assert.assertEquals(2, errors.size());
        assertOperationParameterFailure(errors.get(0), ROOT_ADDRESS, ROOT_OP, PARAM);
        assertOperationParameterFailure(errors.get(1), CHILD_ADDRESS, CHILD_OP, PARAM);
View Full Code Here

        }
    }


    private void validateDescriptionProviders(AdditionalInitialization additionalInit, KernelServices kernelServices) {
        ValidationConfiguration arbitraryDescriptors = additionalInit.getModelValidationConfiguration();
        ModelNode address = new ModelNode();
        address.setEmptyList();
        address.add("subsystem", mainSubsystemName);

        ModelNode op = new ModelNode();
View Full Code Here

     * in the controller. The default is an empty registry.
     *
     * @return An ArbitraryDescriptors instance containing the arbitrary descriptors, or {@code null} to not validate the description providers.
     */
    protected ModelDescriptionValidator.ValidationConfiguration getModelValidationConfiguration() {
        return new ValidationConfiguration();
    }
View Full Code Here

     * in the controller. The default is an empty registry.
     *
     * @return An ArbitraryDescriptors instance containing the arbitrary descriptors, or {@code null} to not validate the description providers.
     */
    protected ModelDescriptionValidator.ValidationConfiguration getModelValidationConfiguration() {
        return new ValidationConfiguration();
    }
View Full Code Here

    }

    @Override
    protected ValidationConfiguration getModelValidationConfiguration() {
        // use this configuration to report any exceptional cases for DescriptionProviders
        return new ValidationConfiguration();
    }
View Full Code Here

    }

    @Override
    protected ValidationConfiguration getModelValidationConfiguration() {
        // use this configuration to report any exceptional cases for DescriptionProviders
        return new ValidationConfiguration();
    }
View Full Code Here

     * in the controller. The default is an empty registry.
     *
     * @return An ArbitraryDescriptors instance containing the arbitrary descriptors, or {@code null} to not validate the description providers.
     */
    protected ModelDescriptionValidator.ValidationConfiguration getModelValidationConfiguration() {
        return new ValidationConfiguration();
    }
View Full Code Here

            validateModelDescriptions(address.append(pe), sub);
        }
    }

    private void validateDescriptionProviders(AdditionalInitialization additionalInit, KernelServices kernelServices) {
        ValidationConfiguration arbitraryDescriptors = additionalInit.getModelValidationConfiguration();
        ModelNode address = new ModelNode();
        address.setEmptyList();
        address.add("subsystem", mainSubsystemName);

        ModelNode op = new ModelNode();
View Full Code Here

TOP

Related Classes of org.jboss.as.subsystem.test.ModelDescriptionValidator.ValidationConfiguration

Copyright © 2018 www.massapicom. 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.