| Quintiq file version 2.0 | 
| #parent: #root | 
| Method VerifyIncludeExclude ( | 
|   MacroPlan macroplan, | 
|   String scenario | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|     // Setup optimizer puzzle and subset(s) | 
|     this->( utf ) { | 
|       opt := OptimizerPuzzle::Create( macroplan, 'OptTest', '', false, false, null( OptimizerPuzzleWIP ) ); | 
|       return opt; | 
|     } | 
|     ->( opt ) { | 
|       this.VerifyIncludeExcludeSetupSubset( opt, scenario ); | 
|       return opt; | 
|     } | 
|     ->( opt ) { | 
|       lines := scenario.Tokenize( String::NewLine() ); | 
|       expectedDefaultAllIncluded := this.VerifyIncludeExcludeGetDefaultAllIncluded( lines ); | 
|        | 
|       expectedStockingPoints := this.VerifyIncludeExcludeSetupExpectationStockingPoints( macroplan, lines, expectedDefaultAllIncluded ); | 
|       expectedUnits := this.VerifyIncludeExcludeSetupExpectationUnits( macroplan, lines, expectedDefaultAllIncluded ); | 
|        | 
|       // Assert | 
|       actualUnits := opt.GetIncludedUnits(); | 
|       this.Run().AssertTrue( expectedUnits.Size() = actualUnits.Size() and expectedUnits.ContainsAll( actualUnits ), | 
|                              'Expected $0 unit(s), but found $1.'.ReplaceAll( '$0', [String]expectedUnits.Size() ).ReplaceAll( '$1', [String]actualUnits.Size() ) ); | 
|        | 
|       actualStockingPoints := opt.GetIncludedStockingPoints( actualUnits ); | 
|       this.Run().AssertTrue( expectedStockingPoints.Size() = actualStockingPoints.Size() and expectedStockingPoints.ContainsAll( actualStockingPoints ), | 
|                              'Expected $0 stocking point(s), but found $1.'.ReplaceAll( '$0', [String]expectedStockingPoints.Size() ).ReplaceAll( '$1', [String]actualStockingPoints.Size() ) ); | 
|                               | 
|       return opt; | 
|     } | 
|     ->( opt ) { | 
|       opt.Delete(); | 
|     } | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |