Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method VerifyKPIFixedCost ( 
 | 
  MacroPlan macroplan, 
 | 
  Real expectedValue, 
 | 
  Real timeoutInSeconds, 
 | 
  Real elapsedInSeconds 
 | 
) as stream[UTF_UnitTestMPBase] 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    actual := macroplan.GetKPIFixedCost().Round( 0 ); 
 | 
    currency := macroplan.BaseCurrency().Name() 
 | 
    kpiMatch := actual = expectedValue; 
 | 
     
 | 
    ret := emit( this ); 
 | 
     
 | 
    if( not kpiMatch ) 
 | 
    { 
 | 
      if( elapsedInSeconds < timeoutInSeconds ) 
 | 
      { 
 | 
        waitFor := 0.5; 
 | 
        wait := stream[Void]::Wait( Duration::Seconds( waitFor ) ); 
 | 
        ret := ret->After( wait )->VerifyKPIFixedCost( macroplan, expectedValue, timeoutInSeconds, elapsedInSeconds + waitFor ); 
 | 
      } 
 | 
      else 
 | 
      { 
 | 
        this.Run().RegisterFailure( 'Expected KPI value for Fixed cost is ' + [String]expectedValue + ' ' + currency + ' but actual value is ' + [String]actual  + ' ' + currency); 
 | 
      } 
 | 
    } 
 | 
     
 | 
    return ret; 
 | 
  *] 
 | 
  InterfaceProperties { Accessibility: 'Module' } 
 | 
} 
 |