9, OK
?Command, Timeout, OK
Calibrate ??™100.0??™
?Exit, Timeout, OK
Did the expected handlers run? [y/n] y
Tests run: 1, Failures: 0, Not run: 0, Time: 2.353 seconds
We write a similar test method where the reported temperature differs too much
from the previous sample. The controller should not calculate a calibration factor,
but should reset the sensor instead. This test also succeeds. After the message with
the out-of-range temperature, the command to calibrate is not executed; instead, no
handler runs. But then the controller resets the sensor, and after a more reasonable
temperature is received, the controller resumes carrying out calibrate commands.
> nunit-console /include=OutOfRangeMessage Tests.dll
...
Overview 43
Included categories: OutOfRangeMessage
.?Timeout, Timeout, Error
Reset
?Message ??™99.9??™, Message, Error
CheckMessage ??™99.9??™, compare to 99.9, OK
?Timeout, Timeout, OK
Poll
?Message ??™999.9??™, Message, OK
CheckMessage ??™999.9??™, compare to 99.9, Error
?Command, Timeout, Error
?Timeout, Timeout, Error
Reset
?Message ??™100.1??™, Message, Error
CheckMessage ??™100.1??™, compare to 99.9, OK
?Timeout, Timeout, OK
Poll
?Message ??™101.5??™, Message, OK
CheckMessage ??™101.5??™, compare to 100.1, OK
?Command, Timeout, OK
Calibrate ??™101.5??™
?Exit, Timeout, OK
Did the expected handlers run? [y/n] y
Tests run: 1, Failures: 0, Not run: 0, Time: 7.
Pages:
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81