Weighing: Differentiate between scale and terminal
This commit is contained in:
@@ -31,16 +31,19 @@ namespace Tests.UnitTests.WeighingTests {
|
||||
Mock.Weight = 1235;
|
||||
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
GrossWeight = 1235, TareWeight = 0, NetWeight = 1235,
|
||||
ScaleId = "1",
|
||||
Date = new DateOnly(2020, 10, 17), Time = new TimeOnly(14, 23),
|
||||
}));
|
||||
Mock.Weight = 1240;
|
||||
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
GrossWeight = 1240, TareWeight = 0, NetWeight = 1240,
|
||||
ScaleId = "1",
|
||||
Date = new DateOnly(2020, 10, 17), Time = new TimeOnly(14, 23),
|
||||
}));
|
||||
Mock.Weight = 1245;
|
||||
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
GrossWeight = 1245, TareWeight = 0, NetWeight = 1245,
|
||||
ScaleId = "1",
|
||||
Date = new DateOnly(2020, 10, 17), Time = new TimeOnly(14, 23),
|
||||
}));
|
||||
}
|
||||
@@ -50,19 +53,19 @@ namespace Tests.UnitTests.WeighingTests {
|
||||
Mock.Weight = 1235;
|
||||
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
GrossWeight = 1235, TareWeight = 0, NetWeight = 1235,
|
||||
WeighingId = "1", FullWeighingId = $"2020-10-17/1",
|
||||
ScaleId = "1", WeighingId = "1", FullWeighingId = $"2020-10-17/1",
|
||||
Date = new DateOnly(2020, 10, 17), Time = new TimeOnly(14, 23),
|
||||
}));
|
||||
Mock.Weight = 3335;
|
||||
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
GrossWeight = 3335, TareWeight = 0, NetWeight = 3335,
|
||||
WeighingId = "2", FullWeighingId = $"2020-10-17/2",
|
||||
ScaleId = "1", WeighingId = "2", FullWeighingId = $"2020-10-17/2",
|
||||
Date = new DateOnly(2020, 10, 17), Time = new TimeOnly(14, 23),
|
||||
}));
|
||||
Mock.Weight = 6420;
|
||||
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
GrossWeight = 6420, TareWeight = 0, NetWeight = 6420,
|
||||
WeighingId = "3", FullWeighingId = $"2020-10-17/3",
|
||||
ScaleId = "1", WeighingId = "3", FullWeighingId = $"2020-10-17/3",
|
||||
Date = new DateOnly(2020, 10, 17), Time = new TimeOnly(14, 23),
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user