Quintiq file version 2.0
#parent: #root
Method PTF_TestSelectScenarioComparison (
  output Real duration_o,
  output String response_o,
  String formname,
  String listname,
  String scenarioname1,
  String scenario2name
) as Boolean id:Method_LibPTF_pnlTestRunner_PTF_TestSelectScenarioComparison
{
  #keys: '[136682.0.314444072]'
  Body:
  [*
    issuccessful := false;
    
    hasscenario := exists( ScenarioManager,
                           ScenarioNode.astype( Scenario ),
                           scenario,
                           scenario.Name() = scenarioname1  or scenario.Name() = scenario2name );
    
    if( hasscenario )
    {
      startprecisionctr := OS::PrecisionCounter();
      issuccessful := this.PTF_SelectListFrom( formname, listname, scenarioname1, scenario2name, response_o );
    
      duration_o   := this.PTF_GetDurationInMilisecond( startprecisionctr );
      response_o   := 'Select scenario comparison' ;
    
    }
    else
    {
      response_o := 'PTF_TestSelectScenarioComparison: Precondition failed because scenario not found'; // Your precondition failed reason
    }
    
    return issuccessful;
  *]
}
