fix test
This commit is contained in:
parent
0552a3f1ed
commit
7bf17a1f5c
|
@ -6,6 +6,7 @@ import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
import org.mockito.Mockito;
|
||||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||||
import org.powermock.modules.junit4.PowerMockRunner;
|
import org.powermock.modules.junit4.PowerMockRunner;
|
||||||
|
|
||||||
|
@ -23,6 +24,8 @@ import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.utils.JsonHelper;
|
import info.nightscout.utils.JsonHelper;
|
||||||
import info.nightscout.utils.SP;
|
import info.nightscout.utils.SP;
|
||||||
|
|
||||||
|
import static org.mockito.ArgumentMatchers.anyDouble;
|
||||||
|
import static org.mockito.ArgumentMatchers.anyInt;
|
||||||
import static org.mockito.ArgumentMatchers.anyLong;
|
import static org.mockito.ArgumentMatchers.anyLong;
|
||||||
import static org.powermock.api.mockito.PowerMockito.when;
|
import static org.powermock.api.mockito.PowerMockito.when;
|
||||||
|
|
||||||
|
@ -187,5 +190,8 @@ public class APSResultTest {
|
||||||
when(ConfigBuilderPlugin.getActivePump()).thenReturn(virtualPumpPlugin);
|
when(ConfigBuilderPlugin.getActivePump()).thenReturn(virtualPumpPlugin);
|
||||||
|
|
||||||
when(constraintChecker.isClosedLoopAllowed()).thenReturn(closedLoopEnabled);
|
when(constraintChecker.isClosedLoopAllowed()).thenReturn(closedLoopEnabled);
|
||||||
|
|
||||||
|
Mockito.when(SP.getDouble(anyInt(), anyDouble())).thenReturn(30d);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue