Package eu.scape_project.planning.services.taverna.generator

Examples of eu.scape_project.planning.services.taverna.generator.T2FlowExecutablePlanGenerator


    }

    @Test
    public void addQaComponent_noMigration() throws IOException, ParserConfigurationException, SAXException,
        DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        planGenerator.addTargetPort();

        WorkflowDescription wf = mockQaAny("QA component");
        planGenerator.addQaComponent(wf, generateQaContent(QA_DATAFLOW_ID, "QA component"), DEFAULT_PARAMETERS,
            DEFAULT_MEASURES);

        Document doc = getDocument(planGenerator);

        assertThat(getContent(doc, TOP_WF + "/t2f:processors/t2f:processor/t2f:name"), is("QA_component"));
View Full Code Here


    }

    @Test
    public void addQaComponent_set_sourceLeft_targetRight() throws IOException, ParserConfigurationException,
        SAXException, DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        planGenerator.addTargetPort();

        addMigrationMock(planGenerator);
        WorkflowDescription wf = mockQaAny("QA component");
        planGenerator.addQaComponent(wf, generateQaContent(QA_DATAFLOW_ID, "QA component"), InputSource.SOURCE_OBJECT,
            InputSource.TARGET_OBJECT, DEFAULT_PARAMETERS, DEFAULT_MEASURES, RelatedObject.RIGHT_OBJECT);

        Document doc = getDocument(planGenerator);

        assertThat(
View Full Code Here

    }

    @Test
    public void addQaComponent_set_sourceRight_targetLeft() throws IOException, ParserConfigurationException,
        SAXException, DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        planGenerator.addTargetPort();

        addMigrationMock(planGenerator);

        WorkflowDescription wf = mockQaAny("QA component");
        planGenerator.addQaComponent(wf, generateQaContent(QA_DATAFLOW_ID, "QA component"), InputSource.TARGET_OBJECT,
            InputSource.SOURCE_OBJECT, DEFAULT_PARAMETERS, DEFAULT_MEASURES, RelatedObject.RIGHT_OBJECT);

        Document doc = getDocument(planGenerator);

        assertThat(
View Full Code Here

    }

    @Test
    public void addQaComponent_mimetypePair_sourceLeft_targetRight() throws IOException, ParserConfigurationException,
        SAXException, DocumentException {
        T2FlowExecutablePlanGenerator planGenerator = new T2FlowExecutablePlanGenerator("Name", "Author", "image/tiff",
            "image/jp2");

        planGenerator.addSourcePort();
        planGenerator.addTargetPort();

        addMigrationMock(planGenerator);

        WorkflowDescription wf = mockQa("QA component");
        when(wf.acceptsMimetypes("image/tiff", "image/jp2")).thenReturn(true);
        when(wf.acceptsLeftMimetype("image/tiff")).thenReturn(true);
        when(wf.acceptsRightMimetype("image/jp2")).thenReturn(true);
        planGenerator.addQaComponent(wf, generateQaContent(QA_DATAFLOW_ID, "QA component"), DEFAULT_PARAMETERS,
            DEFAULT_MEASURES);

        Document doc = getDocument(planGenerator);

        assertThat(
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.services.taverna.generator.T2FlowExecutablePlanGenerator

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.