Package com.technophobia.substeps.execution.node

Examples of com.technophobia.substeps.execution.node.TestRootNodeBuilder


        final Method failMethod = getFailMethod();
        Assert.assertNotNull(nonFailMethod);
        Assert.assertNotNull(failMethod);

        final String scenarioName = "scenarioName";
        final TestRootNodeBuilder rootNodeBuilder = new TestRootNodeBuilder();
        final TestFeatureNodeBuilder featureBuilder = rootNodeBuilder.addFeature(new Feature("test feature", "file"));

        final TestOutlineScenarioNodeBuilder outlineScenarioBuilder = featureBuilder.addOutlineScenario(scenarioName);
        final TestOutlineScenarioRowNodeBuilder rowBuilder1 = outlineScenarioBuilder.addRow(1);
        final TestOutlineScenarioRowNodeBuilder rowBuilder2 = outlineScenarioBuilder.addRow(2);

        final TestBasicScenarioNodeBuilder row1ScenarioBuilder = rowBuilder1.setBasicScenario(scenarioName);
        row1ScenarioBuilder.addStepImpl(getClass(), nonFailMethod).addStepImpl(getClass(), failMethod)
                .addStepImpl(getClass(), nonFailMethod);
        final TestBasicScenarioNodeBuilder row2ScenarioBuilder = rowBuilder2.setBasicScenario(scenarioName);
        row2ScenarioBuilder.addStepImpls(3, getClass(), nonFailMethod);

        final RootNode rootNode = rootNodeBuilder.build();

        final ExecutionNodeRunner runner = new ExecutionNodeRunner();

        final INotificationDistributor notificationDistributor = getPrivateField(runner, "notificationDistributor");
        final SetupAndTearDown setupAndTearDown = mock(SetupAndTearDown.class);
View Full Code Here


        final Method failMethod = getFailMethod();
        Assert.assertNotNull(nonFailMethod);
        Assert.assertNotNull(failMethod);

        final String scenarioName = "scenarioName";
        final TestRootNodeBuilder rootNodeBuilder = new TestRootNodeBuilder();
        final TestFeatureNodeBuilder featureBuilder = rootNodeBuilder.addFeature(new Feature("test feature", "file"));

        final TestOutlineScenarioNodeBuilder outlineScenarioBuilder = featureBuilder.addOutlineScenario(scenarioName);
        final TestOutlineScenarioRowNodeBuilder rowBuilder1 = outlineScenarioBuilder.addRow(1);
        final TestOutlineScenarioRowNodeBuilder rowBuilder2 = outlineScenarioBuilder.addRow(2);

        final TestBasicScenarioNodeBuilder row1ScenarioBuilder = rowBuilder1.setBasicScenario(scenarioName);
        row1ScenarioBuilder.addStepImpl(getClass(), nonFailMethod).addStepImpl(getClass(), failMethod)
                .addStepImpl(getClass(), nonFailMethod);
        final TestBasicScenarioNodeBuilder row2ScenarioBuilder = rowBuilder2.setBasicScenario(scenarioName);
        row2ScenarioBuilder.addStepImpl(getClass(), nonFailMethod).addStepImpls(3, getClass(), failMethod);

        final RootNode rootNode = rootNodeBuilder.build();

        final Class<?>[] setupClasses = new Class[] { this.getClass() };
        final SetupAndTearDown setupAndTearDown = new SetupAndTearDown(setupClasses, new ImplementationCache());

        final ExecutionNodeRunner runner = new ExecutionNodeRunner();
View Full Code Here

    private static final int SCENARIO_STEPS_EXPECTED = 10;

    @Before
    public void setupDataAsAbove() {

        TestRootNodeBuilder rootBuilder = new TestRootNodeBuilder();

        TestFeatureNodeBuilder feature1 = rootBuilder.addFeature(new Feature("Feature1", "File"));
        TestFeatureNodeBuilder feature2 = rootBuilder.addFeature(new Feature("Feature2", "File"));

        TestBasicScenarioNodeBuilder scenarioA = feature1.addBasicScenario("ScenarioA");
        TestBasicScenarioNodeBuilder scenarioB = feature1.addBasicScenario("ScenarioB");

        TestSubstepNodeBuilder aSubstep1 = scenarioA.addSubstep();
        aSubstep1.addSubstep().addStepImpl(getClass(), null);
        aSubstep1.addSubstep().addStepImpl(getClass(), null);
        scenarioA.addSubstep().addStepImpl(getClass(), null).addStepImpl(getClass(), null);
        scenarioB.addStepImpl(getClass(), null).addSubstep().addStepImpl(getClass(), null);

        TestOutlineScenarioNodeBuilder scenarioOutline1 = feature2.addOutlineScenario("SO1");
        TestOutlineScenarioRowNodeBuilder row1 = scenarioOutline1.addRow(1);
        TestOutlineScenarioRowNodeBuilder row2 = scenarioOutline1.addRow(2);

        TestBasicScenarioNodeBuilder basicScenarioC = row1.setBasicScenario("BasicScenarioC");
        basicScenarioC.addSubstep().addStepImpls(2, getClass(), null);
        basicScenarioC.addSubstep().addStepImpl(getClass(), null);
        row2.setBasicScenario(basicScenarioC);

        TestOutlineScenarioNodeBuilder scenarioOutline2 = feature2.addOutlineScenario("SO2");

        TestOutlineScenarioRowNodeBuilder sO2Row1 = scenarioOutline2.addRow(0);

        TestBasicScenarioNodeBuilder basicScenarioD = sO2Row1.setBasicScenario("BasicScenarioD");
        basicScenarioD.addStepImpl(getClass(), null);

        TestOutlineScenarioRowNodeBuilder sO2Row2 = scenarioOutline2.addRow(1);
        sO2Row2.setBasicScenario(basicScenarioD);

        reportData = new ReportData();
        reportData.addRootExecutionNode(rootBuilder.build());

    }
View Full Code Here

TOP

Related Classes of com.technophobia.substeps.execution.node.TestRootNodeBuilder

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.