congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TestScenarioResult
Code IndexAdd Tabnine to your IDE (free)

How to use
TestScenarioResult
in
org.drools.workbench.screens.testscenario.model

Best Java code snippets using org.drools.workbench.screens.testscenario.model.TestScenarioResult (Showing top 7 results out of 315)

origin: kiegroup/drools-wb

  @Override
  public void callback(TestScenarioResult result) {
    scenario = result.getScenario();
    view.showResults();
    auditPage.showFiredRulesAuditLog(result.getLog());
    auditPage.showFiredRules(ScenarioUtils.findExecutionTrace(scenario));
    view.hideBusyIndicator();
    redraw();
    testReportingDocksHandler.expandTestResultsDock();
  }
},
origin: org.drools/drools-wb-test-scenario-editor-backend

public TestScenarioResult run(final String identifier,
               final Scenario scenario,
               final KieModule module) {
  try {
    final HashMap<String, KieSession> ksessions = new HashMap<String, KieSession>();
    final String ksessionName = getKSessionName(scenario.getKSessions());
    ksessions.put(ksessionName,
           loadKSession(module,
                  ksessionName));
    final AuditLogger auditLogger = new AuditLogger(ksessions);
    final ScenarioRunner4JUnit scenarioRunner = new ScenarioRunner4JUnit(
        scenario,
        ksessions,
        getMaxRuleFirings());
    run(identifier,
      scenarioRunner,
      defaultTestResultMessageEvent);
    return new TestScenarioResult(scenario,
                   auditLogger.getLog());
  } catch (InitializationError initializationError) {
    throw new GenericPortableException(initializationError.getMessage());
  }
}
origin: org.drools/drools-wb-test-scenario-editor-backend

private void testScenario(String scenarioName, boolean isExpectedSuccess) throws Exception {
  final KieModule module = mock(KieModule.class);
  final URL scenarioResource = getClass().getResource(scenarioName);
  final Path scenarioPath = PathFactory.newPath(scenarioResource.getFile(),
                         scenarioResource.toURI().toString());
  final Scenario scenario = testEditorService.load(scenarioPath);
  assertFalse(scenario.wasSuccessful());
  final TestScenarioResult result = service.run("userName", scenario, module);
  assertEquals(isExpectedSuccess, scenario.wasSuccessful());
  assertEquals(isExpectedSuccess, result.getScenario().wasSuccessful());
  verify(defaultTestResultMessageEvent).fire(testResultMessageCaptor.capture());
  final TestResultMessage resultMessage = testResultMessageCaptor.getValue();
  assertEquals(isExpectedSuccess, resultMessage.getFailures().size() == 0);
  assertEquals(isExpectedSuccess, resultMessage.wasSuccessful());
}
origin: kiegroup/drools-wb

public TestScenarioResult run(final String identifier,
               final Scenario scenario,
               final KieModule module) {
  try {
    final HashMap<String, KieSession> ksessions = new HashMap<String, KieSession>();
    final String ksessionName = getKSessionName(scenario.getKSessions());
    ksessions.put(ksessionName,
           loadKSession(module,
                  ksessionName));
    final AuditLogger auditLogger = new AuditLogger(ksessions);
    final ScenarioRunner4JUnit scenarioRunner = new ScenarioRunner4JUnit(
        scenario,
        ksessions,
        getMaxRuleFirings());
    run(identifier,
      scenarioRunner,
      defaultTestResultMessageEvent);
    return new TestScenarioResult(scenario,
                   auditLogger.getLog());
  } catch (InitializationError initializationError) {
    throw new GenericPortableException(initializationError.getMessage());
  }
}
origin: kiegroup/drools-wb

private void testScenario(String scenarioName, boolean isExpectedSuccess) throws Exception {
  final KieModule module = mock(KieModule.class);
  final URL scenarioResource = getClass().getResource(scenarioName);
  final Path scenarioPath = PathFactory.newPath(scenarioResource.getFile(),
                         scenarioResource.toURI().toString());
  final Scenario scenario = testEditorService.load(scenarioPath);
  assertFalse(scenario.wasSuccessful());
  final TestScenarioResult result = service.run("userName", scenario, module);
  assertEquals(isExpectedSuccess, scenario.wasSuccessful());
  assertEquals(isExpectedSuccess, result.getScenario().wasSuccessful());
  verify(defaultTestResultMessageEvent).fire(testResultMessageCaptor.capture());
  final TestResultMessage resultMessage = testResultMessageCaptor.getValue();
  assertEquals(isExpectedSuccess, resultMessage.getFailures().size() == 0);
  assertEquals(isExpectedSuccess, resultMessage.wasSuccessful());
}
origin: org.drools/drools-wb-test-scenario-editor-client

final TestScenarioResult result = new TestScenarioResult(scenarioRunResult,
                             Collections.EMPTY_SET);
when(service.runScenario(eq("userName"),
origin: kiegroup/drools-wb

final TestScenarioResult result = new TestScenarioResult(scenarioRunResult,
                             Collections.EMPTY_SET);
when(service.runScenario(eq("userName"),
org.drools.workbench.screens.testscenario.modelTestScenarioResult

Most used methods

  • <init>
  • getScenario
  • getLog

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now