Add test.
This commit is contained in:
parent
25aa6f859f
commit
561c7fb470
1 changed files with 20 additions and 0 deletions
|
@ -156,4 +156,24 @@ public class CommandQueueTest extends CommandQueue {
|
||||||
public boolean isThisProfileSet(Profile profile) {
|
public boolean isThisProfileSet(Profile profile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void callingCancelAllBolusesClearsQueue() throws Exception {
|
||||||
|
prepareMock(0d, 0);
|
||||||
|
|
||||||
|
// add normal and SMB-bolus to queue
|
||||||
|
Assert.assertEquals(0, size());
|
||||||
|
|
||||||
|
bolus(new DetailedBolusInfo(), null);
|
||||||
|
|
||||||
|
DetailedBolusInfo smb = new DetailedBolusInfo();
|
||||||
|
smb.isSMB = true;
|
||||||
|
bolus(smb, null);
|
||||||
|
|
||||||
|
Assert.assertEquals(2, size());
|
||||||
|
|
||||||
|
// cancelling all boluses clear all boluses from the queue
|
||||||
|
cancelAllBoluses();
|
||||||
|
Assert.assertEquals(0, size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue