From c65d518bc0aaca6fc92d47912a1a92ed87629553 Mon Sep 17 00:00:00 2001 From: Amr Hossam Date: Sat, 30 Nov 2024 16:27:24 +0200 Subject: [PATCH] remove region weather test Signed-off-by: Amr Hossam --- .../android/io/test/RegionWeatherTest.java | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 onebusaway-android/src/androidTest/java/org/onebusaway/android/io/test/RegionWeatherTest.java diff --git a/onebusaway-android/src/androidTest/java/org/onebusaway/android/io/test/RegionWeatherTest.java b/onebusaway-android/src/androidTest/java/org/onebusaway/android/io/test/RegionWeatherTest.java deleted file mode 100644 index 0addd550e..000000000 --- a/onebusaway-android/src/androidTest/java/org/onebusaway/android/io/test/RegionWeatherTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.onebusaway.android.io.test; - -import static androidx.test.InstrumentationRegistry.getTargetContext; -import static junit.framework.Assert.assertNotNull; - -import android.content.ContentResolver; -import android.net.Uri; - -import org.junit.Test; -import org.onebusaway.android.R; -import org.onebusaway.android.io.elements.ObaRegion; -import org.onebusaway.android.io.request.ObaRegionsRequest; -import org.onebusaway.android.io.request.ObaRegionsResponse; -import org.onebusaway.android.io.request.weather.ObaWeatherRequest; -import org.onebusaway.android.io.request.weather.models.ObaWeatherResponse; - - -public class RegionWeatherTest { - @Test - public void testRequest() { - - final Uri.Builder builder = new Uri.Builder(); - builder.scheme(ContentResolver.SCHEME_ANDROID_RESOURCE); - builder.authority(getTargetContext().getPackageName()); - builder.path(String.valueOf(R.raw.regions_v3)); - - ObaRegionsRequest regionsRequest = ObaRegionsRequest.newRequest(getTargetContext(), builder.build()); - ObaRegionsResponse regionsResponse = regionsRequest.call(); - - final ObaRegion[] list = regionsResponse.getRegions(); - - for (ObaRegion region : list) { - ObaWeatherRequest weatherRequest= ObaWeatherRequest.newRequest(region.getId()); - ObaWeatherResponse weatherResponse = weatherRequest.call(); - assertNotNull(weatherResponse); - } - - } - -}