1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-30 08:46:16 +02:00
Gadgetbridge/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/service/TestDeviceService.java

26 lines
697 B
Java
Raw Normal View History

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);
}
}