Package com.consol.citrus.model.config.core

Examples of com.consol.citrus.model.config.core.ValidationMatcherLibrary


    /**
     * Gets the default validation matcher library from Citrus Spring bean configuration.
     * @return
     */
    public ValidationMatcherLibrary getDefaultValidationMatcherLibrary() {
        ValidationMatcherLibrary library = new ObjectFactory().createValidationMatcherLibrary();

        ValidationMatcherConfig config = new ValidationMatcherConfig();
        com.consol.citrus.validation.matcher.ValidationMatcherLibrary defaultValidationMatcher = config.getValidationMatcherLibrary();
        library.setId(defaultValidationMatcher.getName());
        library.setPrefix(defaultValidationMatcher.getPrefix());

        for (Map.Entry<String, ValidationMatcher> matcherEntry : defaultValidationMatcher.getMembers().entrySet()) {
            ValidationMatcherLibrary.Matcher matcher = new ValidationMatcherLibrary.Matcher();
            matcher.setName(matcherEntry.getKey());
            matcher.setClazz(matcherEntry.getValue().getClass().getName());
            library.getMatchers().add(matcher);
        }

        return library;
    }
View Full Code Here


     * Gets the validation matcher library object from bean in application context. Bean is identified by its id.
     * @param id
     * @return
     */
    public ValidationMatcherLibrary getValidationMatcherLibrary(String id) {
        ValidationMatcherLibrary library = springBeanService.getBeanDefinition(projectService.getProjectContextConfigFile(), id, ValidationMatcherLibrary.class);

        if (library == null) {
            SpringBean springBean = springBeanService.getBeanDefinition(projectService.getProjectContextConfigFile(), id, SpringBean.class);
            if (springBean != null) {
                library = matcherLibrarySpringBeanConverter.convert(springBean);
View Full Code Here

TOP

Related Classes of com.consol.citrus.model.config.core.ValidationMatcherLibrary

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.