Examples of GroovyDSLOpStringParser


Examples of org.rioproject.impl.opstring.GroovyDSLOpStringParser

    @Test
    public void testLoadingConfigurationAsHttpResource() throws IOException, ConfigurationException {
        Webster webster = new Webster(0, System.getProperty("user.dir")+"/src/test/resources");
        System.setProperty("TEST_PORT", Integer.toString(webster.getPort()));
        OpStringParser opStringParser = new GroovyDSLOpStringParser();
        File file = new File("src/test/resources/opstring/simple_opstring_with_http_config.groovy");
        List<OpString> opStrings = opStringParser.parse(file,   // opstring
                                                        null,     // parent classloader
                                                        null,     // defaultGroups
                                                        null);    // loadPath
        ServiceElement serviceElement = opStrings.get(0).getServices()[0];
View Full Code Here

Examples of org.rioproject.impl.opstring.GroovyDSLOpStringParser

                                                    + source.getClass().getName() + " source");
        }

        /* Determine we are using Groovy */
        if (filename.endsWith(".groovy"))
            parser = new GroovyDSLOpStringParser();
        else
            throw new UnsupportedOperationException("There is no support for " + filename +  " format");

        return parser;
    }
View Full Code Here

Examples of org.rioproject.impl.opstring.GroovyDSLOpStringParser

*/
public class AssociationManagementSettingsTest {
    @Test
    public void testAssociationManagementParsing() {
        File file = new File("src/test/resources/opstrings/association_management.groovy");
        OpStringParser dslParser = new GroovyDSLOpStringParser();
        List<OpString> opstrings = dslParser.parse(file, null, null, null);
        Assert.assertEquals("There should be one and only one opstring", 1, opstrings.size());
        OpString opstring = opstrings.get(0);
        ServiceElement serviceElement = opstring.getServices()[0];
        Assert.assertEquals(15, serviceElement.getAssociationDescriptors()[0].getServiceDiscoveryTimeout());
        Assert.assertEquals(TimeUnit.SECONDS, serviceElement.getAssociationDescriptors()[0].getServiceDiscoveryTimeUnits());
View Full Code Here

Examples of org.rioproject.impl.opstring.GroovyDSLOpStringParser

public class IncludeOpstringTest {
    @Test
    public void load1()  {
        String baseDir = System.getProperty("user.dir");
        File file = new File(baseDir, "../src/main/opstring/gnostic.groovy");
        GroovyDSLOpStringParser parser = new GroovyDSLOpStringParser();
        List<OpString> opStrings = parser.parse(file, null, null, null);
        Assert.assertEquals(1, opStrings.size());
    }
View Full Code Here

Examples of org.rioproject.impl.opstring.GroovyDSLOpStringParser

    @Test
    public void load2()  {
        String baseDir = System.getProperty("user.dir");
        File file = new File(baseDir, "src/test/opstring/testOpString.groovy");
        GroovyDSLOpStringParser parser = new GroovyDSLOpStringParser();
        List<OpString> opStrings = parser.parse(file, null, null, null);
    }
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.