[android] Remove deprecated junit.framework.Assert (#683)

This commit is contained in:
Bart Louwers
2023-01-11 13:27:35 +00:00
committed by GitHub
parent 41eff5e198
commit aed7c501f2
36 changed files with 204 additions and 206 deletions

View File

@@ -14,10 +14,6 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertSame;
import static junit.framework.Assert.assertTrue;
@RunWith(AndroidJUnit4ClassRunner.class)
public class MapboxTest extends AppCenter {

View File

@@ -15,9 +15,9 @@ import com.mapbox.mapboxsdk.geometry.ProjectedMeters
import com.mapbox.mapboxsdk.maps.renderer.MapRenderer
import com.mapbox.mapboxsdk.style.layers.TransitionOptions
import com.mapbox.mapboxsdk.testapp.utils.TestConstants
import junit.framework.Assert.*
import org.junit.After
import org.junit.Assert
import org.junit.Assert.*
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith

View File

@@ -8,8 +8,8 @@ import com.mapbox.mapboxsdk.maps.Style
import com.mapbox.mapboxsdk.style.layers.BackgroundLayer
import com.mapbox.mapboxsdk.style.layers.PropertyFactory
import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity
import junit.framework.Assert.assertNotNull
import org.junit.Assert
import org.junit.Assert.assertNotNull
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

View File

@@ -10,7 +10,8 @@ import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
import com.mapbox.mapboxsdk.testapp.activity.BaseTest;
import com.mapbox.mapboxsdk.testapp.activity.<%- subPackage %>.<%- activity %>;
import junit.framework.Assert;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -1,5 +1,10 @@
package com.mapbox.mapboxsdk.testapp.annotations;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import android.app.Activity;
import androidx.core.content.res.ResourcesCompat;
@@ -20,11 +25,6 @@ import org.junit.Test;
import java.util.Map;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
/**
* Tests integration between Icons and Markers
*/

View File

@@ -1,5 +1,7 @@
package com.mapbox.mapboxsdk.testapp.geometry;
import static org.junit.Assert.assertEquals;
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
@@ -10,8 +12,6 @@ import com.mapbox.mapboxsdk.testapp.utils.TestConstants;
import org.junit.Test;
import static junit.framework.Assert.assertEquals;
/**
* Instrumentation test to validate integration of LatLngBounds
*/

View File

@@ -7,7 +7,7 @@ import com.mapbox.mapboxsdk.maps.MapView
import com.mapbox.mapboxsdk.maps.Style
import com.mapbox.mapboxsdk.testapp.R
import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity
import junit.framework.Assert.assertEquals
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test

View File

@@ -10,8 +10,8 @@ import com.mapbox.mapboxsdk.maps.MapView
import com.mapbox.mapboxsdk.maps.MapboxMapOptions
import com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.MapboxGLSurfaceView
import com.mapbox.mapboxsdk.testapp.activity.FeatureOverviewActivity
import junit.framework.Assert.assertNotNull
import junit.framework.Assert.assertTrue
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

View File

@@ -12,8 +12,8 @@ import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import static com.mapbox.mapboxsdk.testapp.activity.offline.OfflineActivity.JSON_CHARSET;
import static junit.framework.Assert.assertEquals;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@RunWith(AndroidJUnit4ClassRunner.class)
public class OfflineUtilsTest extends AppCenter {

View File

@@ -6,7 +6,6 @@ import androidx.test.rule.ActivityTestRule
import com.mapbox.mapboxsdk.AppCenter
import com.mapbox.mapboxsdk.storage.FileSource
import com.mapbox.mapboxsdk.testapp.activity.espresso.EspressoTestActivity
import junit.framework.Assert
import org.junit.After
import org.junit.Before
import org.junit.Rule

View File

@@ -4,7 +4,7 @@ import android.app.Activity
import androidx.annotation.WorkerThread
import com.mapbox.mapboxsdk.AppCenter
import com.mapbox.mapboxsdk.storage.FileSource
import junit.framework.Assert
import org.junit.Assert
import java.io.File
import java.util.concurrent.CountDownLatch

View File

@@ -1,5 +1,7 @@
package com.mapbox.mapboxsdk.testapp.string;
import static org.junit.Assert.assertEquals;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
import com.mapbox.mapboxsdk.testapp.activity.EspressoTest;
@@ -7,8 +9,6 @@ import com.mapbox.mapboxsdk.testapp.activity.EspressoTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.Assert.assertEquals;
/**
* Test verifying if String#toUpperCase and String#toLowerCase produces desired results
* <p>

View File

@@ -32,8 +32,8 @@ import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionCol
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionHeight;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionOpacity;
import static com.mapbox.mapboxsdk.testapp.action.MapboxMapAction.invoke;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@RunWith(AndroidJUnit4ClassRunner.class)
public class LightTest extends BaseTest {

View File

@@ -23,9 +23,8 @@ import com.mapbox.mapboxsdk.style.sources.VectorSource;
import com.mapbox.mapboxsdk.testapp.R;
import com.mapbox.mapboxsdk.testapp.activity.EspressoTest;
import junit.framework.Assert;
import org.hamcrest.Matcher;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -35,8 +35,8 @@ import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionHei
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.fillExtrusionOpacity;
import static com.mapbox.mapboxsdk.testapp.action.MapboxMapAction.invoke;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@RunWith(AndroidJUnit4ClassRunner.class)
public class LightTest extends BaseTest {