Examples of Scenario


Examples of org.destecs.core.scenario.Scenario

        script = expandScript(script, scenarioFile,null);
        return new ScriptSimulationEngine(contractFile, script);
      }

      Scenario scenario = new ScenarioParserWrapper().parse(scenarioFile);
      if (scenario == null)
      {
        throw new Exception("Scenario not parse correct: "
            + scenarioFile);
      }
View Full Code Here

Examples of org.drools.guvnor.client.modeldriven.testing.Scenario

                      v.actualResult.intValue() );

    }

    public void testTestingEventListener() throws Exception {
        Scenario sc = new Scenario();
        sc.rules.add( "foo" );
        sc.rules.add( "bar" );
        ExecutionTrace ext = new ExecutionTrace();

        sc.fixtures.add( ext );
View Full Code Here

Examples of org.drools.guvnor.models.testscenarios.shared.Scenario

        String s = xt.toXML(sc);
        return s;
    }

    public Scenario unmarshal(String xml) {
        if (xml == null) return new Scenario();
        if (xml.trim().equals("")) return new Scenario();
        Object o = xt.fromXML(xml);
        return (Scenario) o;
    }
View Full Code Here

Examples of org.drools.ide.common.client.modeldriven.testing.Scenario

            while (it.hasNext()) {
                AssetItem as = it.next();
                if ( !as.getDisabled() ) {
                    RuleAsset asset = repositoryAssetOperations.loadAsset( as );
                    Scenario sc = (Scenario) asset.getContent();
                    runScenario( packageItem.getName(),
                            sc,
                            coverage );// runScenario(sc, res,
                    // workingMemory).scenario;

                    int[] totals = sc.countFailuresTotal();
                    resultSummaries.add( new ScenarioResultSummary( totals[0],
                            totals[1],
                            asset.getName(),
                            asset.getDescription(),
                            asset.getUuid() ) );
View Full Code Here

Examples of org.drools.workbench.models.testscenarios.shared.Scenario

        ioService().write( basePath.resolve( "dummy" ),
                           "<none>" );

        //Add test files
        final Path path1 = basePath.resolve( "scenario1.scenario" );
        final Scenario model1 = TestScenarioFactory.makeTestScenarioWithVerifyFact( "org.drools.workbench.screens.testscenario.backend.server.indexing",
                                                                                    new ArrayList<Import>() {{
                                                                                        add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Applicant" ) );
                                                                                        add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Mortgage" ) );
                                                                                    }},
                                                                                    "scenario1" );
        final String xml1 = ScenarioXMLPersistence.getInstance().marshal( model1 );
        ioService().write( path1,
                           xml1 );
        final Path path2 = basePath.resolve( "scenario2.scenario" );
        final Scenario model2 = TestScenarioFactory.makeTestScenarioWithoutVerifyFact( "org.drools.workbench.screens.testscenario.backend.server.indexing",
                                                                                       new ArrayList<Import>() {{
                                                                                           add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Applicant" ) );
                                                                                           add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Mortgage" ) );
                                                                                       }},
                                                                                       "scenario2" );
View Full Code Here

Examples of org.eclipse.test.internal.performance.db.Scenario

      Variations v= new Variations();
      v.put(CONFIG, "%"); //$NON-NLS-1$
      v.put(BUILD, build);
          Scenario[] scenarios= DB.queryScenarios(v, SCENARIO_NAME_0, CONFIG, null);
          if (scenarios != null && scenarios.length > 0) {
              Scenario s= scenarios[0];
              String[] failureMessages= s.getFailureMessages();
              if (failureMessages.length == 1) {
                String mesg= failureMessages[0];
                if (mesg != null && mesg.equals("Performance criteria not met when compared to '{b=ref, c=test}':\nCPU Time: 1 s is not within [95%, 105%] of 900 ms")) //$NON-NLS-1$
                  failed= true;
              }
View Full Code Here

Examples of org.jbehave.core.model.Scenario

    public void shouldNotPassSilentlyOutputNotAllowedByMetaFilter() {
        // Given
        StoryReporter delegate = mock(StoryReporter.class);
        SilentSuccessFilter filter = new SilentSuccessFilter(delegate);
        Story story = new Story();
        Scenario scenario = new Scenario();

        String metaFilter = "";
        // When
        filter.storyNotAllowed(story, metaFilter);
        filter.scenarioNotAllowed(scenario, metaFilter);
View Full Code Here

Examples of org.jbehave.core.model.Scenario

        Properties meta = new Properties();
        meta.setProperty("theme", "testing");
        meta.setProperty("author", "Mauro");
        Story story = new Story("/path/to/story",
                new Description("An interesting story"), new Meta(meta), new Narrative("renovate my house", "customer", "get a loan"),
                Arrays.asList(new Scenario("A scenario", new Meta(meta), GivenStories.EMPTY, ExamplesTable.EMPTY, new ArrayList<String>())));
        reporter.beforeStory(story, false);
        if (storyNotAllowed) {
            reporter.storyNotAllowed(story, "-theme testing");
        } else  {
            reporter.beforeScenario(story.getScenarios().get(0).getTitle());
View Full Code Here

Examples of org.jbehave.core.model.Scenario

    @Test
    public void shouldMapStoriesAllowedByFilter() throws Throwable {
        // Given
        Meta meta1 = mock(Meta.class, "meta1");
        Story story1 = new Story("/path/to/story1", Description.EMPTY, meta1, Narrative.EMPTY, asList(new Scenario("scenario1", meta1)));
        Meta meta2 = mock(Meta.class, "meta2");
        Story story2 = new Story("/path/to/story2", Description.EMPTY, meta2, Narrative.EMPTY, asList(new Scenario("scenario2", meta2)));
        MetaFilter filter = mock(MetaFilter.class);
        String filterAsString = "-some property";
       
        // When
        StoryMapper mapper = new StoryMapper();
View Full Code Here

Examples of org.jbehave.core.model.Scenario

          + "| 4 | true |\n";
    Story story = storyParser.parseStory(storyAsText);
    assertThat(story.getDescription().asString(), equalTo("Hello Car"));   
    List<Scenario> scenarios = story.getScenarios();
    assertThat(scenarios.size(), equalTo(1));
    Scenario scenario = scenarios.get(0);
    List<String> steps = scenario.getSteps();
    assertThat(scenario.getTitle(), equalTo("Car can drive"));   
    assertThat(steps.size(), equalTo(2));
    assertThat(steps.get(0), equalTo("Given I have a car"));
    assertThat(steps.get(1), equalTo("Then I can drive them according to:\n"
        + "|wheels|can_drive|\n"
        + "|1|false|\n"
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.