mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-02 06:52:55 +01:00
77cad5c47f
Lots of support classes to enable local testing, without a device or an emulator.
26 lines
697 B
Java
26 lines
697 B
Java
package nodomain.freeyourgadget.gadgetbridge.service;
|
|
|
|
import android.content.Intent;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceService;
|
|
import nodomain.freeyourgadget.gadgetbridge.test.GBMockIntent;
|
|
|
|
public class TestDeviceService extends GBDeviceService {
|
|
private final AbstractServiceTestCase<?> mTestCase;
|
|
|
|
public TestDeviceService(AbstractServiceTestCase<?> testCase) throws Exception {
|
|
super(testCase.getContext());
|
|
mTestCase = testCase;
|
|
}
|
|
|
|
@Override
|
|
protected Intent createIntent() {
|
|
return new GBMockIntent();
|
|
}
|
|
|
|
@Override
|
|
protected void invokeService(Intent intent) {
|
|
mTestCase.startService(intent);
|
|
}
|
|
}
|