Skip to content

Commit

Permalink
niigata: partial work on test suite updates for pallet events
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzzeb committed Dec 3, 2024
1 parent f534616 commit 7690b36
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 60 deletions.
27 changes: 23 additions & 4 deletions server/test/niigata/FakeIccDsl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2212,11 +2212,30 @@ private class ExpectPalletCycleChange : ExpectedChange
{
public int Pallet { get; set; }
public int Minutes { get; set; }
public bool Start { get; init; }
public IEnumerable<LogMaterial> Material { get; init; }
}

public static ExpectedChange ExpectPalletCycle(int pal, int mins)
public static ExpectedChange ExpectPalletStart(int pal, IEnumerable<LogMaterial> mats)
{
return new ExpectPalletCycleChange() { Pallet = pal, Minutes = mins };
return new ExpectPalletCycleChange()
{
Pallet = pal,
Minutes = 0,
Start = true,
Material = mats,
};
}

public static ExpectedChange ExpectPalletEnd(int pal, int mins, IEnumerable<LogMaterial> mats)
{
return new ExpectPalletCycleChange()
{
Pallet = pal,
Minutes = mins,
Start = false,
Material = mats,
};
}

private class ExpectAddProgram : ExpectedChange
Expand Down Expand Up @@ -2486,13 +2505,13 @@ var expectDelete in expectedChanges
expectedLogs.Add(
new LogEntry(
cntr: -1,
mat: Enumerable.Empty<LogMaterial>(),
mat: palletCycleChange.Material,
pal: palletCycleChange.Pallet,
ty: LogType.PalletCycle,
locName: "Pallet Cycle",
locNum: 1,
prog: "",
start: false,
start: palletCycleChange.Start,
endTime: _status.TimeOfStatusUTC,
result: "PalletCycle",
elapsed: TimeSpan.FromMinutes(palletCycleChange.Minutes),
Expand Down
Loading

0 comments on commit 7690b36

Please sign in to comment.