Package com.consol.citrus.variable.dictionary.xml

Examples of com.consol.citrus.variable.dictionary.xml.NodeMappingDataDictionary


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

        Assert.assertEquals(dictionaries.size(), 3L);

        NodeMappingDataDictionary dictionary = dictionaries.get("dataDictionary1");
        Assert.assertEquals(dictionary.getName(), "dataDictionary1");
        Assert.assertTrue(dictionary.isGlobalScope());
        Assert.assertEquals(dictionary.getPathMappingStrategy(), DataDictionary.PathMappingStrategy.EXACT_MATCH);
        Assert.assertNull(dictionary.getMappingFile());
        Assert.assertEquals(dictionary.getMappings().size(), 3L);

        Assert.assertEquals(dictionary.getMappings().get("node.name.1"), "value1");
        Assert.assertEquals(dictionary.getMappings().get("node.name.2"), "value2");
        Assert.assertEquals(dictionary.getMappings().get("node.name.3"), "value3");

        dictionary = dictionaries.get("dataDictionary2");
        Assert.assertEquals(dictionary.getName(), "dataDictionary2");
        Assert.assertFalse(dictionary.isGlobalScope());
        Assert.assertEquals(dictionary.getPathMappingStrategy(), DataDictionary.PathMappingStrategy.STARTS_WITH);
        Assert.assertNull(dictionary.getMappingFile());
        Assert.assertEquals(dictionary.getMappings().size(), 1L);

        Assert.assertEquals(dictionary.getMappings().get("node.name.1"), "value1");

        dictionary = dictionaries.get("dataDictionary3");
        Assert.assertEquals(dictionary.getName(), "dataDictionary3");
        Assert.assertTrue(dictionary.isGlobalScope());
        Assert.assertEquals(dictionary.getPathMappingStrategy(), DataDictionary.PathMappingStrategy.EXACT_MATCH);
        Assert.assertNotNull(dictionary.getMappingFile());
        Assert.assertEquals(dictionary.getMappings().size(), 2L);

        Assert.assertEquals(dictionary.getMappings().get("node.name.1"), "value1");
        Assert.assertEquals(dictionary.getMappings().get("node.name.2"), "value2");
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.variable.dictionary.xml.NodeMappingDataDictionary

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.