Package com.dtolabs.rundeck.core.common

Examples of com.dtolabs.rundeck.core.common.Framework


        super(name);
    }

    public void setUp() {
        super.setUp();
        final Framework frameworkInstance = getFrameworkInstance();
        final FrameworkProject frameworkProject = frameworkInstance.getFrameworkProjectMgr().createFrameworkProject(
            PROJ_NAME);
        File resourcesfile = new File(frameworkProject.getNodesResourceFilePath());
        //copy test nodes to resources file
        try {
            FileUtils.copyFileStreams(new File("src/test/resources/com/dtolabs/rundeck/core/common/test-nodes1.xml"),
View Full Code Here


        }
        catch (NullPointerException ex) {
        }
    }
    public void testReplaceTokensInScript_dataContext_can_be_null() throws Exception {
        Framework fwk = getFrameworkInstance();
        //null data context is ok
        File temp = null;
        try {
            temp = DataContextUtils.replaceTokensInScript("test script", null, fwk, null);
        } catch (IOException e) {
View Full Code Here

        assertTrue(temp.length() > 0);
        temp.delete();
    }

    public void testReplaceTokensInScript_dataContext_can_be_empty() throws Exception {
        Framework fwk = getFrameworkInstance();

        //test empty data context
        File temp = DataContextUtils.replaceTokensInScript("test script",
            new HashMap<String, Map<String, String>>(),
            fwk, null);
View Full Code Here

        assertTrue(temp.length() > 0);
        temp.delete();
    }

    public void testReplaceTokensInScript_contentTest() throws Exception {
        Framework fwk = getFrameworkInstance();
        //test content
        File temp = DataContextUtils.replaceTokensInScript("test script some data @test.data@\n"
                                                           + "test line 2 some data @test.data2@\n",
            new HashMap<String, Map<String, String>>(),
            fwk, null);
View Full Code Here

        assertEquals("test line 2 some data ", line1);
        assertFalse(br.ready());
        assertNull(br.readLine());
    }
    public void testReplaceTokensInScript_contentTest_unixLineEndings() throws Exception {
        Framework fwk = getFrameworkInstance();
        //test content
        String content = "test script some data @test.data@\n"
                        + "test line 2 some data @test.data2@\n";
        HashMap<String, Map<String, String>> dataContext =
                new HashMap<String, Map<String, String>>();
View Full Code Here

                "test script some data My-test-data\n"
                + "test line 2 some data \n", result);
    }

    public void testReplaceTokensInScript_contentTest_windowsLineEndings() throws Exception {
        Framework fwk = getFrameworkInstance();
        //test content
        String content = "test script some data @test.data@\n"
                        + "test line 2 some data @test.data2@\n";
        HashMap<String, Map<String, String>> dataContext =
                new HashMap<String, Map<String, String>>();
View Full Code Here

                "test script some data My-test-data\r\n"
                + "test line 2 some data \r\n", result);
    }

    public void testReplaceTokensInScript_namespace_attributes() throws Exception {
        Framework fwk = getFrameworkInstance();
            //test content
        HashMap<String, Map<String, String>> dataContext = new HashMap<String, Map<String, String>>();
        dataContext.put("test", new HashMap<String, String>());
        dataContext.get("test").put("some:data", "test1");
        File temp = DataContextUtils.replaceTokensInScript("test script some data @test.some:data@\n"
View Full Code Here

            assertNull(br.readLine());

    }

    public void testReplaceTokensInScript7() throws Exception {
        Framework fwk = getFrameworkInstance();
            //test content
            final HashMap<String, Map<String, String>> data = new HashMap<String, Map<String, String>>();
            data.put("test", new HashMap<String, String>());
            File temp = DataContextUtils.replaceTokensInScript("test script some data @test.data@\n"
                                                               + "test line 2 some data @test.data2@\n",
View Full Code Here

    FrameworkProject frameworkProject;

    public void setUp() {

        final Framework frameworkInstance = getFrameworkInstance();
        frameworkProject = frameworkInstance.getFrameworkProjectMgr().createFrameworkProject(
            PROJ_NAME);
        File resourcesfile = new File(frameworkProject.getNodesResourceFilePath());
        //copy test nodes to resources file
        try {
            FileUtils.copyFileStreams(new File("src/test/resources/com/dtolabs/rundeck/core/common/test-nodes1.xml"),
View Full Code Here

            assertNull(br.readLine());

    }

    public void testReplaceTokensInScript8() throws Exception {
        Framework fwk = getFrameworkInstance();
            //test content
            final HashMap<String, Map<String, String>> data = new HashMap<String, Map<String, String>>();
            final HashMap<String, String> testdata = new HashMap<String, String>();
            testdata.put("data", "this is a test");
            data.put("test", testdata);
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.common.Framework

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.