1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| Quintiq file version 2.0
| #parent: #root
| Method VerifyUnitCapacity (
| Unit unit,
| DateTime start,
| Real expectedMin,
| Real expectedMax,
| Real expectedMaxload,
| Number expectedNrOfUnit
| )
| {
| Description: 'Verify min and max unit capacity on given date'
| TextBody:
| [*
| // Verify that there is already 1 unit capacities
| unitCapacity := this.GetUnitCapacity( unit, start );
|
| if( this.Run().AssertNotIsNull( unitCapacity, this.GetUnitCapacityMissingError( unit, start ) ) )
| {
| this.Run().AssertEqual( expectedMin, unitCapacity.MinCapacity(), this.GetFailuredMessage( "unitcapacity.MinCapacity", start ) );
| this.Run().AssertEqual( expectedMax, unitCapacity.MaxCapacity(), this.GetFailuredMessage( "unitcapacity.MaxCapacity", start ) );
| this.Run().AssertEqual( expectedMaxload, unitCapacity.MaximumLoadPercentage(), this.GetFailuredMessage( "unitcapacity.MaxLoadPercentage", start ) );
| this.Run().AssertEqual( expectedNrOfUnit, unitCapacity.NrOfUnitsOpen(), this.GetFailuredMessage( "unitcapacity.NrOfUnitOpen", start ) );
| }
| *]
| InterfaceProperties { Accessibility: 'Module' }
| }
|
|