AndroidStudio: code cleanup.

This commit is contained in:
Dennis Guse
2023-08-08 17:57:36 +02:00
parent 3910837d1a
commit 7530e1d120
12 changed files with 214 additions and 821 deletions
@@ -51,7 +51,7 @@ import de.dennisguse.opentracks.data.models.TrackPoint;
import de.dennisguse.opentracks.services.handlers.TrackPointCreator;
@RunWith(AndroidJUnit4.class)
public class TrackRecordingServiceTestMarker {
public class TrackRecordingServiceMarkerTest {
@Rule
public final ServiceTestRule mServiceRule = ServiceTestRule.withTimeout(5, TimeUnit.SECONDS);
@@ -86,7 +86,7 @@ public class TrackRecordingServiceTestMarker {
}
@After
public void tearDown() throws TimeoutException {
public void tearDown() {
TrackRecordingServiceTestUtils.resetService(mServiceRule, context);
// Ensure that the database is empty after every test
@@ -49,7 +49,7 @@ import de.dennisguse.opentracks.stats.TrackStatistics;
* So, if something fails, subsequent tests may be affected.
*/
@RunWith(AndroidJUnit4.class)
public class TrackRecordingServiceTestRecording {
public class TrackRecordingServiceRecordingTest {
@Rule
public final ServiceTestRule mServiceRule = ServiceTestRule.withTimeout(5, TimeUnit.SECONDS);
@@ -96,7 +96,7 @@ public class TrackRecordingServiceTestRecording {
}
@After
public void tearDown() throws TimeoutException {
public void tearDown() {
TrackRecordingServiceTestUtils.resetService(mServiceRule, context);
// Ensure that the database is empty after every test
contentProviderUtils.deleteAllTracks(context);
@@ -54,7 +54,7 @@ import de.dennisguse.opentracks.services.handlers.GpsStatusValue;
* As states are checked against MutableLiveData that are updated via `postValue()` (is asynchronous to be inform other Threads), Thread.sleep() is required.
*/
@RunWith(AndroidJUnit4.class)
public class TrackRecordingServiceTestStateMachine {
public class TrackRecordingServiceStateMachineTest {
@Rule
public final ServiceTestRule mServiceRule = ServiceTestRule.withTimeout(5, TimeUnit.SECONDS);
@@ -93,7 +93,7 @@ public class TrackRecordingServiceTestStateMachine {
}
@After
public void tearDown() throws TimeoutException {
public void tearDown() {
TrackRecordingServiceTestUtils.resetService(mServiceRule, context);
// Ensure that the database is empty after every test
contentProviderUtils.deleteAllTracks(context);