Example #1
0
        internal static void AssertEquivalent(this ProductionSchedule expected, IProductionScheduleDetailReturn result)
        {
            Assert.AreEqual(expected.ToProductionScheduleKey().KeyValue, result.ProductionScheduleKey);
            expected.ScheduledItems.AssertEquivalent(result.ScheduledItems, e => e.Index, r => r.Index,
                                                     (e, r) =>
            {
                Assert.AreEqual(e.FlushBefore, r.FlushBefore);
                Assert.AreEqual(e.FlushBeforeInstructions, r.FlushBeforeInstructions);
                Assert.AreEqual(e.FlushAfter, r.FlushAfter);
                Assert.AreEqual(e.FlushAfterInstructions, r.FlushAfterInstructions);

                Assert.AreEqual(e.PackSchedule.ToPackScheduleKey().KeyValue, r.PackSchedule.PackScheduleKey);
                Assert.AreEqual(e.PackSchedule.ProductionDeadline, r.PackSchedule.ProductionDeadline);
                Assert.AreEqual(e.PackSchedule.SummaryOfWork, r.PackSchedule.Instructions);
                Assert.AreEqual(e.PackSchedule.ChileProduct.Mesh, r.PackSchedule.AverageGranularity);
                Assert.AreEqual(e.PackSchedule.GetAverage(StaticAttributeNames.AB), r.PackSchedule.AverageAoverB, 0.01);
                Assert.AreEqual(e.PackSchedule.GetAverage(StaticAttributeNames.Scoville), r.PackSchedule.AverageScoville, 0.01);
                Assert.AreEqual(e.PackSchedule.GetAverage(StaticAttributeNames.Scan), r.PackSchedule.AverageScan, 0.01);

                e.PackSchedule.ChileProduct.AssertEqual(r.PackSchedule.ChileProduct);
            });
        }
Example #2
0
 internal static void AssertEquivalent(this ProductionSchedule expected, IProductionScheduleSummaryReturn result)
 {
     Assert.AreEqual(expected.ToProductionScheduleKey().KeyValue, result.ProductionScheduleKey);
     Assert.AreEqual(expected.ProductionDate, result.ProductionDate);
     expected.ProductionLineLocation.AssertEqual(result.ProductionLine);
 }