| Quintiq file version 2.0 | 
| #parent: #root | 
| Method VerifyPISPAccountSalesCreated ( | 
|   MacroPlan macroplan, | 
|   Real timeout, | 
|   Real elapsedtime | 
| ) as stream[UTF_UnitTestMPDefaultSalesCostDriver] | 
| { | 
|   Description: 'Verify that pisp accounts are created' | 
|   TextBody: | 
|   [* | 
|     nrofpispaccount := counter( macroplan, Account_MP.AccountAssignment.astype( PISPAccount ), pispacc,  | 
|                                 pispacc.CostDriver() = Translations::MP_AccountAssignmentCostDriverSales() ); | 
|     ret := emit( this ); | 
|      | 
|     if ( nrofpispaccount =0 ) | 
|     { | 
|       if( elapsedtime < timeout ) | 
|       { | 
|         waitFor := 0.5;    | 
|         wait := stream[Void]::Wait( Duration::Seconds( waitFor ) ); | 
|         ret := ret->After( wait )->VerifyPISPAccountSalesCreated( macroplan, timeout, elapsedtime + waitFor )  | 
|       } | 
|       else  | 
|       { | 
|         this.Run().RegisterFailure( "Expected pisp accounts with sales cost driver are created." );   | 
|       } | 
|     }   | 
|     return ret; | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |