Package com.consol.citrus.validation

Examples of com.consol.citrus.validation.MessageValidatorRegistry


        beanDefinitionContext = createApplicationContext("context");
        Map<String, MessageValidatorRegistry> messageValidators = beanDefinitionContext.getBeansOfType(MessageValidatorRegistry.class);

        Assert.assertEquals(messageValidators.size(), 1L);

        MessageValidatorRegistry messageValidatorBean = messageValidators.values().iterator().next();
        Assert.assertEquals(messageValidatorBean.getMessageValidators().size(), 6L);
        Assert.assertEquals(messageValidatorBean.getMessageValidators().get(0).getClass(), DomXmlMessageValidator.class);
        Assert.assertEquals(messageValidatorBean.getMessageValidators().get(1).getClass(), GroovyXmlMessageValidator.class);
        Assert.assertEquals(messageValidatorBean.getMessageValidators().get(2).getClass(), PlainTextMessageValidator.class);
        Assert.assertEquals(messageValidatorBean.getMessageValidators().get(3).getClass(), JsonTextMessageValidator.class);
        Assert.assertEquals(messageValidatorBean.getMessageValidators().get(4).getClass(), GroovyJsonMessageValidator.class);
        Assert.assertEquals(messageValidatorBean.getMessageValidators().get(5).getClass(), XhtmlMessageValidator.class);
    }
View Full Code Here


        // now inject multiple validators
        List<MessageValidator<? extends ValidationContext>> validators = new ArrayList<MessageValidator<? extends ValidationContext>>();
        validators.add(new DomXmlMessageValidator());
        validators.add(new GroovyXmlMessageValidator());
       
        MessageValidatorRegistry messageValidatorRegistry = new MessageValidatorRegistry();
        messageValidatorRegistry.setMessageValidators(validators);
        TestContext newContext = createTestContext();
        newContext.setMessageValidatorRegistry(messageValidatorRegistry);
       
        validationContexts = new ArrayList<ValidationContext>();
        validationContexts.add(validationContext);
View Full Code Here

TOP

Related Classes of com.consol.citrus.validation.MessageValidatorRegistry

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.