mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-10-07 13:39:45 +02:00
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);
|
||
|
}
|
||
|
}
|