Package com.dtolabs.rundeck.core.common

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


        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        HashMap<String, INodeEntry> nodes2 = new HashMap<String, INodeEntry>();
        NodeEntryImpl node2 = new NodeEntryImpl("test2");
        nodes2.put("test2", node2);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        //sub workflow
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes2)).build(), null);

        test.beginWorkflowItem(1, testitem);
        test.finishWorkflowItem(1, testitem, successResult());

        assertEquals(5, testListener1.events.size());
View Full Code Here


        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        HashMap<String, INodeEntry> nodes2 = new HashMap<String, INodeEntry>();
        NodeEntryImpl node2 = new NodeEntryImpl("test2");
        nodes2.put("test2", node2);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        //sub workflow
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes2)).build(), null);

        test.beginWorkflowItem(1, testitem);
        test.finishWorkflowItem(1, testitem, successResult());
        test.finishWorkflowExecution(wfresult.forSuccess(true), null, null);
        test.finishWorkflowItem(1, testitem, successResult());
View Full Code Here

    }
    public void testEventsBeginNodeStepItem() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        test.beginExecuteNodeStep(null, null, node1);

        assertEquals(3, testListener1.events.size());
View Full Code Here

    public void testEventsFinishNodeStepItem() {
        HashMap<String, INodeEntry> nodes = new HashMap<String, INodeEntry>();
        NodeEntryImpl node1 = new NodeEntryImpl("test1");
        nodes.put("test1", node1);
        test.beginWorkflowExecution(ExecutionContextImpl.builder().nodes(new NodeSetImpl(nodes)).build(), null);

        test.beginWorkflowItem(1, testitem);
        test.beginExecuteNodeStep(null, null, node1);
        test.finishExecuteNodeStep(successNodeResult(node1), null, null, node1);
View Full Code Here

        }
    }

    @Test
    public void testStoreNodesInCache() throws Exception {
        final NodeSetImpl iNodeEntries = new NodeSetImpl();
        //delegate returns nodes, should be stored
        test test = new test();
        CachingResourceModelSource source = new CachingResourceModelSource(new ResourceModelSource() {
            @Override
            public INodeSet getNodes() throws ResourceModelSourceException {
View Full Code Here

        Assert.assertEquals(iNodeEntries, test.stored);
    }

    @Test
    public void testNullResult() throws Exception {
        final NodeSetImpl iNodeEntries = new NodeSetImpl();
        //delegate returns nodes, should be stored

        test test = new test();
        CachingResourceModelSource source = new CachingResourceModelSource(new ResourceModelSource() {
            @Override
View Full Code Here

        Assert.assertNull(test.stored);
    }

    @Test
    public void testExceptionResult() throws Exception {
        final NodeSetImpl iNodeEntries = new NodeSetImpl();
        //delegate returns nodes, should be stored
        test test = new test();
        CachingResourceModelSource source = new CachingResourceModelSource(new ResourceModelSource() {
            @Override
            public INodeSet getNodes() throws ResourceModelSourceException {
View Full Code Here

        Assert.assertNull(test.stored);
    }

    @Test
    public void testRTExceptionResult() throws Exception {
        final NodeSetImpl iNodeEntries = new NodeSetImpl();
        //delegate returns nodes, should be stored
        test test = new test();
        CachingResourceModelSource source = new CachingResourceModelSource(new ResourceModelSource() {
            @Override
            public INodeSet getNodes() throws ResourceModelSourceException {
View Full Code Here

        }
    }
    @Test
    public void normal() throws Exception{
        testSource testSource = new TestExceptionCatchingResourceModelSource.testSource();
        final NodeSetImpl iNodeEntries = new NodeSetImpl();
        testSource.returnNodes = iNodeEntries;
        new ExceptionCatchingResourceModelSource(testSource){
            @Override
            INodeSet returnResultNodes(INodeSet nodes) throws ResourceModelSourceException {
                Assert.assertEquals(iNodeEntries, nodes);
View Full Code Here

        Assert.assertEquals(null, nodes);
    }
    @Test
    public void testSubexceptionValues() throws Exception{
        testSource testSource = new TestExceptionCatchingResourceModelSource.testSource();
        final NodeSetImpl iNodeEntries = new NodeSetImpl();
        testSource.returnNodes = iNodeEntries;
        testSource.throwRTException = false;
        INodeSet nodes = new ExceptionCatchingResourceModelSource(testSource) {
            @Override
            INodeSet returnResultNodes(INodeSet nodes) throws ResourceModelSourceException {
View Full Code Here

TOP

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

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.