#1212 mark all tests with test runner annotation

This commit is contained in:
Sean Mac Gillicuddy 2019-07-31 15:53:40 +01:00
parent 3a73b682c9
commit ce8759ff49
7 changed files with 12 additions and 9 deletions

View File

@ -217,8 +217,6 @@ android {
minSdkVersion 15
targetSdkVersion 28
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// See https://github.com/linkedin/dexmaker/issues/65 for why we need the following line.
testInstrumentationRunnerArguments.notClass = "com.android.dex.DexIndexOverflowException"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
archivesBaseName = "$buildNumber"

View File

@ -17,14 +17,13 @@
*/
package org.kiwix.kiwixmobile;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.schibsted.spain.barista.interaction.BaristaMenuClickInteractions;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kiwix.kiwixmobile.R;
import org.kiwix.kiwixmobile.main.MainActivity;
import org.kiwix.kiwixmobile.testutils.TestUtils;

View File

@ -23,10 +23,10 @@ import android.util.Log;
import androidx.test.espresso.IdlingPolicies;
import androidx.test.espresso.IdlingRegistry;
import androidx.test.espresso.ViewInteraction;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.rule.GrantPermissionRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.schibsted.spain.barista.interaction.BaristaMenuClickInteractions;
import com.schibsted.spain.barista.interaction.BaristaSleepInteractions;
import java.util.concurrent.TimeUnit;
@ -37,7 +37,6 @@ import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kiwix.kiwixmobile.R;
import org.kiwix.kiwixmobile.main.MainActivity;
import org.kiwix.kiwixmobile.utils.KiwixIdlingResource;

View File

@ -22,6 +22,7 @@ import android.util.Log;
import androidx.test.espresso.DataInteraction;
import androidx.test.espresso.IdlingPolicies;
import androidx.test.espresso.IdlingRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;
import androidx.test.rule.GrantPermissionRule;
import com.schibsted.spain.barista.interaction.BaristaMenuClickInteractions;
@ -34,6 +35,7 @@ import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kiwix.kiwixmobile.data.ZimContentProvider;
import org.kiwix.kiwixmobile.di.components.DaggerTestComponent;
import org.kiwix.kiwixmobile.di.components.TestComponent;
@ -59,7 +61,7 @@ import static org.kiwix.kiwixmobile.testutils.TestUtils.withContent;
/**
* Created by mhutti1 on 14/04/17.
*/
@RunWith(AndroidJUnit4.class)
public class NetworkTest {
private static final String NETWORK_TEST_TAG = "KiwixNetworkTest";
@Rule

View File

@ -1,13 +1,12 @@
package org.kiwix.kiwixmobile;
import android.preference.Preference;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kiwix.kiwixmobile.R;
import org.kiwix.kiwixmobile.main.MainActivity;
import static androidx.test.espresso.Espresso.onData;

View File

@ -21,6 +21,7 @@ package org.kiwix.kiwixmobile.language;
import android.Manifest;
import androidx.test.espresso.ViewInteraction;
import androidx.test.espresso.intent.Intents;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.GrantPermissionRule;
import com.schibsted.spain.barista.interaction.BaristaSleepInteractions;
import com.schibsted.spain.barista.rule.BaristaRule;
@ -28,6 +29,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kiwix.kiwixmobile.R;
import org.kiwix.kiwixmobile.zim_manager.ZimManageActivity;
@ -47,6 +49,7 @@ import static org.hamcrest.core.IsNull.notNullValue;
import static org.kiwix.kiwixmobile.testutils.Matcher.childAtPosition;
import static org.kiwix.kiwixmobile.testutils.TestUtils.TEST_PAUSE_MS;
@RunWith(AndroidJUnit4.class)
public class LanguageActivityTest {
@Rule

View File

@ -18,11 +18,13 @@
package org.kiwix.kiwixmobile.local;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.yahoo.squidb.data.AbstractModel;
import com.yahoo.squidb.data.SquidCursor;
import com.yahoo.squidb.sql.Query;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kiwix.kiwixmobile.data.ZimContentProvider;
import org.kiwix.kiwixmobile.data.local.KiwixDatabase;
import org.kiwix.kiwixmobile.data.local.dao.RecentSearchDao;
@ -35,6 +37,7 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@RunWith(AndroidJUnit4.class)
public class RecentSearchDatabaseTest {
@Mock private KiwixDatabase kiwixDatabase;