Weighing: Do not ignore gross and tare weight and show it on DeliveryNote
This commit is contained in:
@ -30,15 +30,18 @@ namespace Tests.WeighingTests {
|
||||
public async Task Test_01_CurrentWeight() {
|
||||
Mock.Weight = 1234;
|
||||
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 1234, Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
GrossWeight = 1234, TareWeight = 0, NetWeight = 1234,
|
||||
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
}));
|
||||
Mock.Weight = 1235;
|
||||
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 1235, Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
GrossWeight = 1235, TareWeight = 0, NetWeight = 1235,
|
||||
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
}));
|
||||
Mock.Weight = 1236;
|
||||
Assert.That(await Scale!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 1236, Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
GrossWeight = 1236, TareWeight = 0, NetWeight = 1236,
|
||||
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
}));
|
||||
}
|
||||
|
||||
@ -46,20 +49,20 @@ namespace Tests.WeighingTests {
|
||||
public async Task Test_02_Normal() {
|
||||
Mock.Weight = 1234;
|
||||
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 1234, WeighingId = "1",
|
||||
FullWeighingId = $"2020-10-15/1",
|
||||
GrossWeight = 1234, TareWeight = 0, NetWeight = 1234,
|
||||
WeighingId = "1", FullWeighingId = $"2020-10-15/1",
|
||||
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
}));
|
||||
Mock.Weight = 3333;
|
||||
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 3333, WeighingId = "2",
|
||||
FullWeighingId = $"2020-10-15/2",
|
||||
GrossWeight = 3333, TareWeight = 0, NetWeight = 3333,
|
||||
WeighingId = "2", FullWeighingId = $"2020-10-15/2",
|
||||
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
}));
|
||||
Mock.Weight = 4321;
|
||||
Assert.That(await Scale!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 4321, WeighingId = "3",
|
||||
FullWeighingId = $"2020-10-15/3",
|
||||
GrossWeight = 4321, TareWeight = 0, NetWeight = 4321,
|
||||
WeighingId = "3", FullWeighingId = $"2020-10-15/3",
|
||||
Date = new DateOnly(2020, 10, 15), Time = new TimeOnly(12, 34),
|
||||
}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user