Fix superbolus test & allow APS plugin to be constraint
This commit is contained in:
parent
bb5cec95ea
commit
826497c9f6
|
@ -93,6 +93,8 @@ public abstract class PluginBase {
|
|||
return state == State.ENABLED && specialEnableCondition();
|
||||
if (type == PluginType.CONSTRAINTS && pluginDescription.mainType == PluginType.PUMP && isEnabled(PluginType.PUMP))
|
||||
return true;
|
||||
if (type == PluginType.CONSTRAINTS && pluginDescription.mainType == PluginType.APS && isEnabled(PluginType.APS))
|
||||
return true;
|
||||
if (type == PluginType.PROFILE && pluginDescription.mainType == PluginType.PUMP)
|
||||
return isProfileInterfaceEnabled;
|
||||
return false;
|
||||
|
|
|
@ -122,6 +122,7 @@ public class ConstraintsCheckerTest {
|
|||
|
||||
@Test
|
||||
public void isSuperBolusEnabledTest() throws Exception {
|
||||
OpenAPSSMBPlugin.getPlugin().setPluginEnabled(PluginType.APS, true);
|
||||
|
||||
Constraint<Boolean> c = constraintChecker.isSuperBolusEnabled();
|
||||
Assert.assertEquals(Boolean.FALSE, c.value()); // SMB should limit
|
||||
|
|
Loading…
Reference in a new issue