Package com.volantis.mcs.migrate.impl.framework.graph

Examples of com.volantis.mcs.migrate.impl.framework.graph.DefaultGraph


        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultGraph graph = new DefaultGraph(mockTarget);
        graph.addStep(mockOld2Target);

        Iterator sequence = graph.getSequence(mockOld);

        assertNotNull("Sequence must be non null", sequence);
        assertEquals("", mockOld2Target, sequence.next());
        assertEquals("", false, sequence.hasNext());
View Full Code Here


        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultGraph graph = new DefaultGraph(mockTarget);
        graph.addStep(mockOld2Target);
        graph.addStep(mockReallyOld2Old);

        Iterator oldSequence = graph.getSequence(mockOld);

        assertNotNull("Sequence must be non null", oldSequence);
        assertEquals("", mockOld2Target, oldSequence.next());
        assertEquals("", oldSequence.hasNext(), false);

        Iterator reallyOldSequence = graph.getSequence(mockReallyOld);

        assertNotNull("Sequence must be non null", reallyOldSequence);
        assertEquals("", mockReallyOld2Old, reallyOldSequence.next());
        assertEquals("", mockOld2Target, reallyOldSequence.next());
        assertEquals("", reallyOldSequence.hasNext(), false);
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultGraph graph = new DefaultGraph(mockTarget);

        try {
            /*List sequence =*/ graph.getSequence(mockOld);
            fail("graph has no steps");
        } catch (IllegalStateException e) {
            // success
            e.printStackTrace(System.out);
        }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultGraph graph = new DefaultGraph(mockTarget);
        graph.addStep(mockOld2Target);

        try {
            /*Iterator sequence =*/ graph.getSequence(mockUnknown);
            fail("retrieving a sequence of unknown version should fail");
        } catch (IllegalStateException e) {
            // success
            e.printStackTrace(System.out);
        }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultGraph graph = new DefaultGraph(mockTarget);
        graph.addStep(mockReallyOld2Old);

        try {
            /*List sequence =*/ graph.getSequence(mockOld);
            fail("target is missing");
        } catch (IllegalStateException e) {
            // success
            e.printStackTrace(System.out);
        }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultGraph graph = new DefaultGraph(mockTarget);
        graph.addStep(mockQuiteOld2Target);
        graph.addStep(mockReallyOld2Old);

        try {
            /*List sequence =*/ graph.getSequence(mockReallyOld);
            fail("sequence contains orphan");
        } catch (IllegalStateException e) {
            // success
            e.printStackTrace(System.out);
        }
View Full Code Here

        // ==================================================================
        // Do the test.
        // ==================================================================

        DefaultGraph graph = new DefaultGraph(mockTarget);
        graph.addStep(mockOld2Target);
        graph.addStep(mockReallyOld2Target);

        Iterator sequence;
        sequence = graph.getSequence(mockOld);
        assertNotNull("Sequence must be non null", sequence);
        assertEquals("", mockOld2Target, sequence.next());
        assertEquals("", false, sequence.hasNext());

        sequence = graph.getSequence(mockReallyOld);
        assertNotNull("Sequence must be non null", sequence);
        assertEquals("", mockReallyOld2Target, sequence.next());
        assertEquals("", false, sequence.hasNext());
    }
View Full Code Here

                "type");
        type.setPathRecogniser(new RegexpPathRecogniser(filename));
        type.addContentIdentifier(
                new DefaultContentIdentifier(version1,
                        new RegexpContentRecogniser(inputData)));
        DefaultGraph graph = new DefaultGraph(version2);
        Step step = new DefaultStep(version1, version2,
                new TestStreamMigrator(inputData, outputData));
        graph.addStep(step);
        type.setGraph(graph);
        resourceRecogniser.addType(type);
        DefaultResourceMigrator resourceMigrator =
                new DefaultResourceMigrator(streamBufferFactory,
                        resourceRecogniser, notificationReporter);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.migrate.impl.framework.graph.DefaultGraph

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.