test(commands): second boost keeps the first original after a panel change
ADR-006 rule, now pinned by a test; the explaining comment is in CommandService.write. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2c214c889d
commit
b06dde4587
1 file changed
+11
@@ -634,6 +634,17 @@ class CommandServiceTest {
|
||||
assertEquals(Status.REJECTED, service.apply(command("cwu_comfort", 40, null)).status());
|
||||
}
|
||||
|
||||
@Test
|
||||
void secondBoostKeepsTheFirstOriginalEvenIfThePanelChangedTheRegisterInBetween() throws IOException {
|
||||
var service = afterFirstBoost();
|
||||
registers.values.put(4144, 38);
|
||||
|
||||
service.apply(command("cwu_comfort", 48, Duration.ofHours(2)));
|
||||
|
||||
assertEquals(45, service.pendingRestores().getFirst().originalValue());
|
||||
assertEquals(48, service.pendingRestores().getFirst().appliedValue());
|
||||
}
|
||||
|
||||
private static final class MutableClock extends Clock {
|
||||
private Instant now = T0;
|
||||
private long nanos;
|
||||
|
||||
Reference in new issue
Block a user