[#71] Weighing: Fix reconnection behaviour when COM port is connected/disconnected
This commit is contained in:
1 parent
c1697dc4f3
commit
bf3cc2ea1e
12 files changed
+131
-73
No files matched your search
@@ -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