| Quintiq file version 2.0 | 
| #parent: #root | 
| Method VerifySanityCheckViolationOnUnit ( | 
|   MacroPlan macroplan, | 
|   Unit parent, | 
|   Boolean hassanitycheck, | 
|   Boolean hasenableshiftoptimizationonchild, | 
|   Boolean hasdisabledshiftoptimizationonchild, | 
|   String testdescription | 
| ) | 
| { | 
|   Description: 'Check whether sanity check violated on SanityCheckGroupData, group=Unit' | 
|   TextBody: | 
|   [* | 
|     SanityCheckGroup::DoSanityCheck( parent.MacroPlan() ); | 
|     group := SanityCheckGroupData::GetSanityCheckGroup( macroplan, Unit::GetDefinitionName() ); | 
|     if ( hassanitycheck )  | 
|     {  | 
|       if ( this.Run().AssertNotIsNull( group , "There is 1 sanitycheckdata violation on unit for scenario " + testdescription  ) ) | 
|       { | 
|         this.Run().AssertEqual( 1, parent.SanityCheckMessageData( relsize ), "There should be 1 data warning on parent unit for scenario " + testdescription ); | 
|       } | 
|     }  | 
|     else | 
|     { | 
|        this.Run().AssertEqual( 0, parent.SanityCheckMessageData( relsize ) , "No violation, sanity check message should not generated for scenario " + testdescription ); | 
|     }  | 
|      | 
|     this.Run().AssertTrue( parent.HasEnableShiftOptimizationOnChildren() = hasenableshiftoptimizationonchild, "parent.HasEnableShiftOptimizationOnChildren should be " + [String]hasenableshiftoptimizationonchild + " for scenario " + testdescription); | 
|     this.Run().AssertTrue( parent.HasDisableShiftOptimizationOnChildren() = hasdisabledshiftoptimizationonchild, "parent.HasDisableShiftOptimizationOnChildren should be " +[String]hasdisabledshiftoptimizationonchild + " for scenario " + testdescription ); | 
|   *] | 
|   InterfaceProperties { Accessibility: 'Module' } | 
| } |