[#71] Weighing: Fix reconnection behaviour when COM port is connected/disconnected
All checks were successful
Test / Run tests (push) Successful in 1m52s
All checks were successful
Test / Run tests (push) Successful in 1m52s
This commit is contained in:
@@ -100,7 +100,7 @@ namespace Tests.UnitTests.WeighingTests {
|
||||
Mock.Weight = 1_000;
|
||||
Mock.Tare = 41;
|
||||
Mock.Error = "moving";
|
||||
IOException ex = Assert.ThrowsAsync<IOException>(async () => await Scale!.Weigh());
|
||||
var ex = Assert.ThrowsAsync<WeighingException>(async () => await Scale!.Weigh());
|
||||
Assert.That(ex.Message, Contains.Substring("Waage in Bewegung"));
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace Tests.UnitTests.WeighingTests {
|
||||
Mock.Weight = 1_000;
|
||||
Mock.Tare = 41;
|
||||
Mock.Error = "invalid";
|
||||
Assert.ThrowsAsync<IOException>(async () => await Scale!.Weigh());
|
||||
Assert.ThrowsAsync<FormatException>(async () => await Scale!.Weigh());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user