Weighing: Do not ignore gross and tare weight and show it on DeliveryNote
All checks were successful
Test / Run tests (push) Successful in 2m18s
All checks were successful
Test / Run tests (push) Successful in 2m18s
This commit is contained in:
@ -78,19 +78,23 @@ namespace Tests.WeighingTests {
|
||||
public async Task Test_01_CurrentWeight() {
|
||||
MockA.Weight = 1234;
|
||||
Assert.That(await ScaleA!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 1234, Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
GrossWeight = 1234, TareWeight = 0, NetWeight = 1234,
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
MockB.Weight = 3456;
|
||||
Assert.That(await ScaleB!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 3456, Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
GrossWeight = 3456, TareWeight = 0, NetWeight = 3456,
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
MockA.Weight = 1236;
|
||||
Assert.That(await ScaleA!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 1236, Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
GrossWeight = 1236, TareWeight = 0, NetWeight = 1236,
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
MockB.Weight = 3457;
|
||||
Assert.That(await ScaleB!.GetCurrentWeight(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 3457, Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
GrossWeight = 3457, TareWeight = 0, NetWeight = 3457,
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
}
|
||||
|
||||
@ -98,26 +102,26 @@ namespace Tests.WeighingTests {
|
||||
public async Task Test_02_Normal() {
|
||||
MockA.Weight = 1234;
|
||||
Assert.That(await ScaleA!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 1234, WeighingId = "1",
|
||||
FullWeighingId = $"2020-10-08/1",
|
||||
GrossWeight = 1234, TareWeight = 0, NetWeight = 1234,
|
||||
WeighingId = "1", FullWeighingId = $"2020-10-08/1",
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
MockB.Weight = 3456;
|
||||
Assert.That(await ScaleB!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 3456, WeighingId = "1",
|
||||
FullWeighingId = $"2020-10-08/1",
|
||||
GrossWeight = 3456, TareWeight = 0, NetWeight = 3456,
|
||||
WeighingId = "1", FullWeighingId = $"2020-10-08/1",
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
MockA.Weight = 4321;
|
||||
Assert.That(await ScaleA!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 4321, WeighingId = "2",
|
||||
FullWeighingId = $"2020-10-08/2",
|
||||
GrossWeight = 4321, TareWeight = 0, NetWeight = 4321,
|
||||
WeighingId = "2", FullWeighingId = $"2020-10-08/2",
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
MockB.Weight = 3333;
|
||||
Assert.That(await ScaleB!.Weigh(), Is.EqualTo(new WeighingResult {
|
||||
Weight = 3333, WeighingId = "2",
|
||||
FullWeighingId = $"2020-10-08/2",
|
||||
GrossWeight = 3333, TareWeight = 0, NetWeight = 3333,
|
||||
WeighingId = "2", FullWeighingId = $"2020-10-08/2",
|
||||
Date = new DateOnly(2020, 10, 8), Time = new TimeOnly(8, 47),
|
||||
}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user