move dstPlugin to contraints package

This commit is contained in:
Milos Kozak 2019-03-02 15:13:42 +01:00
parent e27c0c4b8b
commit 987b3d9dd0
3 changed files with 26 additions and 29 deletions

View file

@ -29,12 +29,12 @@ import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.DstHelper.DstHelperPlugin;
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.constraints.dstHelper.DstHelperPlugin;
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
import info.nightscout.androidaps.plugins.general.actions.ActionsFragment;

View file

@ -1,13 +1,9 @@
package info.nightscout.androidaps.plugins.DstHelper;
package info.nightscout.androidaps.plugins.constraints.dstHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
@ -30,6 +26,7 @@ public class DstHelperPlugin extends PluginBase implements ConstraintsInterface
private int minutesToChange = 0;
static DstHelperPlugin plugin = null;
public static DstHelperPlugin getPlugin() {
if (plugin == null)
plugin = new DstHelperPlugin();

View file

@ -1,28 +1,28 @@
package info.nightscout.androidaps.plugins.DstHelper;
package info.nightscout.androidaps.plugins.constraints.dstHelper;
import android.content.Context;
import junit.framework.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import junit.framework.Assert;
import info.AAPSMocker;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP;
import info.nightscout.utils.T;
import org.junit.Test;
import java.util.Calendar;
import java.util.TimeZone;
import info.AAPSMocker;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.SP;
@RunWith(PowerMockRunner.class)
@PrepareForTest({MainApp.class, ConfigBuilderPlugin.class, SP.class, Context.class})
public class DstHelperPluginTest {
DstHelperPlugin plugin = new DstHelperPlugin();
@Test
public void runTest() throws Exception {
AAPSMocker.mockMainApp();