From 4774b6ca292c7e1d12ce6f6fb98d83c8e36beec4 Mon Sep 17 00:00:00 2001 From: shah Date: Tue, 15 Oct 2024 14:54:11 +0530 Subject: [PATCH 1/2] fix: E2E test suits renamed fix: ktlint disable commands removed all over the app fix: Few grammatical mistakes addressed and methods renamed fix: unit test cases lat, lng fixes ALS-1806 --- .github/workflows/test-android-e2e.yml | 4 +- README.md | 4 +- ...t => AWSGeofenceAndConnectionTestSuite.kt} | 4 +- ...t => AWSTrackingAndConnectionTestSuite.kt} | 4 +- .../AfterSearchDirectionButtonWorkingTest.kt | 10 +---- .../CheckRouteEstimatedTimeAndDistanceTest.kt | 2 +- .../main/CheckRouteUserEnterMyLocationTest.kt | 2 +- .../ui/main/ExploreFragmentChangeStyleTest.kt | 6 +-- .../ui/main/ExploreFragmentEnableLocation.kt | 1 - .../main/ExploreFragmentLiveNavigationTest.kt | 2 +- .../ExploreFragmentMapCurrentLocationTest.kt | 1 - .../main/ExploreFragmentMapZoomInOutTest.kt | 2 +- .../ui/main/GeofenceDeleteTest.kt | 6 +-- .../ui/main/GeofenceEditTest.kt | 6 +-- .../ui/main/RouteReverseBetweenFormToTest.kt | 2 +- .../main/SettingsFragmentDefaultRouteTest.kt | 8 ++-- .../AfterSearchDirectionErrorExistsTest.kt | 2 +- .../amazonlocation/utils/retry_rule/Retry.kt | 2 +- .../MyScreenCaptureProcessor.kt | 2 +- .../utils/screenshot_rule/ScreenshotTaker.kt | 2 +- .../screenshot_rule/ScreenshotTakingRule.kt | 2 +- .../amazonlocation/data/response/BusData.kt | 11 ----- .../data/response/MapStyleData.kt | 2 +- .../data/response/MapStyleInnerData.kt | 2 +- .../data/response/NavigationResponse.kt | 10 ++--- .../amazonlocation/ui/main/MainActivity.kt | 6 +-- .../data_provider/DataProviderFragment.kt | 2 +- .../ui/main/explore/ExploreFragment.kt | 6 +-- .../ui/main/explore/NavigationAdapter.kt | 2 +- .../ui/main/language/LanguageFragment.kt | 2 +- .../map_style/MapStyleBottomSheetFragment.kt | 2 +- .../ui/main/map_style/MapStyleFragment.kt | 2 +- .../ui/main/map_style/MapStyleViewModel.kt | 2 +- .../ui/main/region/RegionFragment.kt | 2 +- .../setting/AWSCloudInformationFragment.kt | 2 +- .../TermsAndConditionFragment.kt | 2 +- .../main/tracking/TrackingHistoryAdapter.kt | 2 +- .../ui/main/unit_system/UnitSystemFragment.kt | 2 +- .../ui/main/web_view/WebViewActivity.kt | 2 +- .../amazonlocation/utils/AWSLocationHelper.kt | 6 ++- .../com/aws/amazonlocation/utils/Hashing.kt | 40 ------------------- .../utils/geofence_helper/GeofenceHelper.kt | 2 +- app/src/main/res/values-pt/string.xml | 2 +- .../data/response/ResponseDataTest.kt | 26 ++---------- .../aws/amazonlocation/mock/BusDataTest.kt | 22 ---------- .../amazonlocation/mock/FilterOptionTest.kt | 2 - .../amazonlocation/mock/NavigationDataTest.kt | 25 +++++++----- .../com/aws/amazonlocation/mock/Responses.kt | 12 +++--- .../amazonlocation/mock/StopCoordinateTest.kt | 4 -- .../GeneralUtilsGetLanguageTest.kt | 2 +- .../generalutils/GeneralUtilsGetRegionTest.kt | 2 +- .../GeneralUtilsGetUserNameTest.kt | 2 +- .../GeneralUtilsIsInternetAvailableTest.kt | 2 +- .../GeneralUtilsValidateGrabMapEnableTest.kt | 2 +- .../GeneralUtilsValidateLatLngTest.kt | 6 +-- .../PreferenceManagerSetDefaultConfigTest.kt | 2 +- .../PreferenceManagerSetValueGetValueTest.kt | 2 +- .../utils/turf/TurfMeasurementTest.kt | 6 +-- .../turf/TurfMetaCoordsMultiPolygonTest.kt | 12 +++--- .../utils/turf/TurfMetaCoordsTest.kt | 26 ++++++------ .../units/UnitsCountryToUnitSystemTest.kt | 2 +- .../units/UnitsDefaultIdentityPoolIdTest.kt | 2 +- .../utils/units/UnitsGetDeviceIdTest.kt | 2 +- .../utils/units/UnitsGetDistanceUnitTest.kt | 2 +- .../utils/units/UnitsGetMetricsNewTest.kt | 2 +- .../utils/units/UnitsGetMetricsTest.kt | 2 +- .../UnitsGetSimulationWebSocketUrlTest.kt | 2 +- .../utils/units/UnitsGetTimeTest.kt | 2 +- .../utils/units/UnitsIsGPSEnabledTest.kt | 2 +- .../utils/units/UnitsIsMetricTest.kt | 10 +++-- .../utils/units/UnitsKiloMeterToMeterTest.kt | 2 +- .../utils/units/UnitsMilesToFeetTest.kt | 2 +- .../utils/units/UnitsToLowerUnitTest.kt | 2 +- .../explore/ExploreVMCalculateDistance.kt | 2 +- .../explore/ExploreVMGetAddressFromLatLng.kt | 2 +- .../ExploreVMGetAddressLineFromLatLng.kt | 2 +- .../explore/ExploreVMSetFilterData.kt | 2 +- .../explore/ExploreVMSetMapListData.kt | 2 +- .../geofence/GeofenceVMGeofenceDeleteTest.kt | 6 +-- .../MapStyleVMSetEsriAndHereListData.kt | 2 +- .../mapstyle/MapStyleVMSetFilterData.kt | 2 +- .../mapstyle/MapStyleVMSetHereMapListData.kt | 2 +- .../simulation/SimulationVMGetGeofenceList.kt | 2 +- .../tracking/TrackingVMGetGeofenceList.kt | 2 +- jacoco.gradle | 1 + 85 files changed, 152 insertions(+), 249 deletions(-) rename app/src/androidTest/java/com/aws/amazonlocation/ui/{AWSConnectionSuite2.kt => AWSGeofenceAndConnectionTestSuite.kt} (89%) rename app/src/androidTest/java/com/aws/amazonlocation/ui/{AWSConnectionSuite.kt => AWSTrackingAndConnectionTestSuite.kt} (91%) delete mode 100644 app/src/main/java/com/aws/amazonlocation/data/response/BusData.kt delete mode 100644 app/src/test/java/com/aws/amazonlocation/mock/BusDataTest.kt diff --git a/.github/workflows/test-android-e2e.yml b/.github/workflows/test-android-e2e.yml index f971f304..0a6b288d 100644 --- a/.github/workflows/test-android-e2e.yml +++ b/.github/workflows/test-android-e2e.yml @@ -48,8 +48,8 @@ jobs: adb emu geo fix 72.58727 23.02579 ./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite ./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite2 - ./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite - ./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite2 + ./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSTrackingAndConnectionTestSuite + ./gradlew app:connectedDebugAndroidTest -i -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSGeofenceAndConnectionTestSuite - name: Upload test results uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 43ab098d..ec5db3f9 100644 --- a/README.md +++ b/README.md @@ -133,8 +133,8 @@ Note: ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.DefaultConnectionFlowSuite2 - ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite - ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSConnectionSuite2 + ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSTrackingAndConnectionTestSuite + ./gradlew app:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.aws.amazonlocation.ui.AWSGeofenceAndConnectionTestSuite ## Resources > Maps (Name - Style) diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSConnectionSuite2.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSGeofenceAndConnectionTestSuite.kt similarity index 89% rename from app/src/androidTest/java/com/aws/amazonlocation/ui/AWSConnectionSuite2.kt rename to app/src/androidTest/java/com/aws/amazonlocation/ui/AWSGeofenceAndConnectionTestSuite.kt index c2dc3c13..a6b3bde6 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSConnectionSuite2.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSGeofenceAndConnectionTestSuite.kt @@ -1,6 +1,7 @@ package com.aws.amazonlocation.ui import com.aws.amazonlocation.ui.main.ConnectToAWSTest +import com.aws.amazonlocation.ui.main.GeofenceAddTest import com.aws.amazonlocation.ui.main.GeofenceDeleteTest import com.aws.amazonlocation.ui.main.GeofenceEditTest import com.aws.amazonlocation.ui.main.SettingAWSDisconnectingTest @@ -16,6 +17,7 @@ import org.junit.runners.Suite @Suite.SuiteClasses( ConnectToAWSTest::class, SettingSignInTest::class, + GeofenceAddTest::class, TrackingGeofenceEnterTest::class, TrackingGeofenceExitTest::class, TrackingDeleteTrackingHistoryTest::class, @@ -24,4 +26,4 @@ import org.junit.runners.Suite SettingSignOutTest::class, SettingAWSDisconnectingTest::class, ) -class AWSConnectionSuite2 +class AWSGeofenceAndConnectionTestSuite diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSConnectionSuite.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSTrackingAndConnectionTestSuite.kt similarity index 91% rename from app/src/androidTest/java/com/aws/amazonlocation/ui/AWSConnectionSuite.kt rename to app/src/androidTest/java/com/aws/amazonlocation/ui/AWSTrackingAndConnectionTestSuite.kt index 65be9e67..ffaa5bbc 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSConnectionSuite.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/AWSTrackingAndConnectionTestSuite.kt @@ -1,6 +1,5 @@ package com.aws.amazonlocation.ui -import com.aws.amazonlocation.ui.main.GeofenceAddTest import com.aws.amazonlocation.ui.main.SettingAWSDisconnectingTest import com.aws.amazonlocation.ui.main.SettingSignOutTest import com.aws.amazonlocation.ui.main.TrackingAwsConnectTest @@ -23,8 +22,7 @@ import org.junit.runners.Suite TrackingStartTrackingHistoryLoggedTest::class, TrackingStartTrackingMapDisplayTest::class, TrackingDeleteTrackingHistoryTest::class, - GeofenceAddTest::class, SettingSignOutTest::class, SettingAWSDisconnectingTest::class, ) -class AWSConnectionSuite +class AWSTrackingAndConnectionTestSuite diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/AfterSearchDirectionButtonWorkingTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/AfterSearchDirectionButtonWorkingTest.kt index 0b62ff90..1cf2a758 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/AfterSearchDirectionButtonWorkingTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/AfterSearchDirectionButtonWorkingTest.kt @@ -7,17 +7,13 @@ import androidx.test.core.app.ApplicationProvider import androidx.test.espresso.Espresso.onView import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.action.ViewActions.replaceText -import androidx.test.espresso.action.ViewActions.typeText import androidx.test.espresso.assertion.ViewAssertions.matches -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.isDisplayed +import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation -import androidx.test.rule.ActivityTestRule -import androidx.test.rule.GrantPermissionRule import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.Until -import com.aws.amazonlocation.ACCESS_COARSE_LOCATION -import com.aws.amazonlocation.ACCESS_FINE_LOCATION import com.aws.amazonlocation.AMAZON_MAP_READY import com.aws.amazonlocation.BaseTestMainActivity import com.aws.amazonlocation.BuildConfig @@ -37,11 +33,9 @@ import com.aws.amazonlocation.failTest import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.card.MaterialCardView import com.google.android.material.textfield.TextInputEditText -import dagger.hilt.android.testing.HiltAndroidRule import dagger.hilt.android.testing.HiltAndroidTest import dagger.hilt.android.testing.UninstallModules import org.junit.Assert -import org.junit.Rule import org.junit.Test @UninstallModules(AppModule::class) diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteEstimatedTimeAndDistanceTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteEstimatedTimeAndDistanceTest.kt index 7904ed7d..ba3b1361 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteEstimatedTimeAndDistanceTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteEstimatedTimeAndDistanceTest.kt @@ -8,7 +8,7 @@ import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.action.ViewActions.replaceText import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteUserEnterMyLocationTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteUserEnterMyLocationTest.kt index 8f6ffbf8..3097d70f 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteUserEnterMyLocationTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/CheckRouteUserEnterMyLocationTest.kt @@ -7,7 +7,7 @@ import androidx.test.espresso.action.ViewActions import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentChangeStyleTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentChangeStyleTest.kt index af00e206..bb10efc5 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentChangeStyleTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentChangeStyleTest.kt @@ -7,14 +7,14 @@ import androidx.recyclerview.widget.RecyclerView.ViewHolder import androidx.test.core.app.ApplicationProvider import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.contrib.RecyclerViewActions.actionOnItemAtPosition -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.Until -import com.aws.amazonlocation.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.* import com.aws.amazonlocation.di.AppModule -import com.aws.amazonlocation.utils.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.utils.* import com.google.android.material.bottomsheet.BottomSheetBehavior import dagger.hilt.android.testing.HiltAndroidTest import dagger.hilt.android.testing.UninstallModules diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentEnableLocation.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentEnableLocation.kt index ef795364..c14dd32a 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentEnableLocation.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentEnableLocation.kt @@ -1,7 +1,6 @@ package com.aws.amazonlocation.ui.main import androidx.test.core.app.ApplicationProvider -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentLiveNavigationTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentLiveNavigationTest.kt index 631cecb5..85b5492a 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentLiveNavigationTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentLiveNavigationTest.kt @@ -6,7 +6,7 @@ import androidx.test.espresso.Espresso import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.action.ViewActions.replaceText import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapCurrentLocationTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapCurrentLocationTest.kt index 522f276a..6d06ccb4 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapCurrentLocationTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapCurrentLocationTest.kt @@ -1,7 +1,6 @@ package com.aws.amazonlocation.ui.main import androidx.test.core.app.ApplicationProvider -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapZoomInOutTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapZoomInOutTest.kt index c30739de..aa53a029 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapZoomInOutTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/ExploreFragmentMapZoomInOutTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.ui.main import androidx.test.core.app.ApplicationProvider import androidx.test.espresso.Espresso.onView -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceDeleteTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceDeleteTest.kt index dcaca85d..d39a0379 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceDeleteTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceDeleteTest.kt @@ -8,14 +8,14 @@ import androidx.appcompat.widget.AppCompatTextView import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import androidx.test.espresso.Espresso.onView -import androidx.test.espresso.action.ViewActions.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.action.ViewActions.* import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.rule.ActivityTestRule import androidx.test.rule.GrantPermissionRule -import androidx.test.uiautomator.* // ktlint-disable no-wildcard-imports +import androidx.test.uiautomator.* import com.aws.amazonlocation.AMAZON_MAP_READY import com.aws.amazonlocation.BaseTestMainActivity import com.aws.amazonlocation.BuildConfig diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceEditTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceEditTest.kt index 79b06c46..9f06eeb9 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceEditTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/GeofenceEditTest.kt @@ -8,13 +8,13 @@ import androidx.appcompat.widget.AppCompatTextView import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import androidx.test.espresso.Espresso.onView -import androidx.test.espresso.action.ViewActions.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.action.ViewActions.* import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.rule.ActivityTestRule import androidx.test.rule.GrantPermissionRule -import androidx.test.uiautomator.* // ktlint-disable no-wildcard-imports +import androidx.test.uiautomator.* import com.aws.amazonlocation.AMAZON_MAP_READY import com.aws.amazonlocation.BaseTestMainActivity import com.aws.amazonlocation.BuildConfig diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/RouteReverseBetweenFormToTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/RouteReverseBetweenFormToTest.kt index eb19e304..d72f9df0 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/RouteReverseBetweenFormToTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/RouteReverseBetweenFormToTest.kt @@ -7,7 +7,7 @@ import androidx.test.espresso.action.ViewActions import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/SettingsFragmentDefaultRouteTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/SettingsFragmentDefaultRouteTest.kt index 73678cea..b27c86d3 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/SettingsFragmentDefaultRouteTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/SettingsFragmentDefaultRouteTest.kt @@ -10,19 +10,19 @@ import androidx.test.espresso.action.ViewActions.replaceText import androidx.test.espresso.action.ViewActions.typeText import androidx.test.espresso.assertion.ViewAssertions import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.Until -import com.aws.amazonlocation.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.* import com.aws.amazonlocation.di.AppModule -import com.aws.amazonlocation.utils.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.utils.* import dagger.hilt.android.testing.HiltAndroidTest import dagger.hilt.android.testing.UninstallModules import org.hamcrest.CoreMatchers import org.hamcrest.core.AllOf.allOf -import org.junit.* // ktlint-disable no-wildcard-imports +import org.junit.* @UninstallModules(AppModule::class) @HiltAndroidTest diff --git a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/bug/AfterSearchDirectionErrorExistsTest.kt b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/bug/AfterSearchDirectionErrorExistsTest.kt index 8e4f5df5..c0e7c4ca 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/ui/main/bug/AfterSearchDirectionErrorExistsTest.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/ui/main/bug/AfterSearchDirectionErrorExistsTest.kt @@ -9,7 +9,7 @@ import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.action.ViewActions.replaceText import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.contrib.RecyclerViewActions -import androidx.test.espresso.matcher.ViewMatchers.* // ktlint-disable no-wildcard-imports +import androidx.test.espresso.matcher.ViewMatchers.* import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation import androidx.test.uiautomator.By import androidx.test.uiautomator.UiDevice diff --git a/app/src/androidTest/java/com/aws/amazonlocation/utils/retry_rule/Retry.kt b/app/src/androidTest/java/com/aws/amazonlocation/utils/retry_rule/Retry.kt index adc9c964..e4d88cd5 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/utils/retry_rule/Retry.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/utils/retry_rule/Retry.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.utils.retry_rule // ktlint-disable package-name +package com.aws.amazonlocation.utils.retry_rule @Retention(AnnotationRetention.RUNTIME) annotation class Retry diff --git a/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/MyScreenCaptureProcessor.kt b/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/MyScreenCaptureProcessor.kt index 3a00ba8d..ef5efcff 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/MyScreenCaptureProcessor.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/MyScreenCaptureProcessor.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.utils.screenshot_rule // ktlint-disable package-name +package com.aws.amazonlocation.utils.screenshot_rule import android.os.Environment.DIRECTORY_PICTURES import android.os.Environment.getExternalStoragePublicDirectory diff --git a/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTaker.kt b/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTaker.kt index 8f600b7d..5309d55f 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTaker.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTaker.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.utils.screenshot_rule // ktlint-disable package-name +package com.aws.amazonlocation.utils.screenshot_rule import android.util.Log import androidx.test.runner.screenshot.Screenshot diff --git a/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTakingRule.kt b/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTakingRule.kt index c8234316..ff3f1cbf 100644 --- a/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTakingRule.kt +++ b/app/src/androidTest/java/com/aws/amazonlocation/utils/screenshot_rule/ScreenshotTakingRule.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.utils.screenshot_rule // ktlint-disable package-name +package com.aws.amazonlocation.utils.screenshot_rule import org.junit.rules.TestWatcher import org.junit.runner.Description diff --git a/app/src/main/java/com/aws/amazonlocation/data/response/BusData.kt b/app/src/main/java/com/aws/amazonlocation/data/response/BusData.kt deleted file mode 100644 index e192324e..00000000 --- a/app/src/main/java/com/aws/amazonlocation/data/response/BusData.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.aws.amazonlocation.data.response - -import android.animation.ValueAnimator -import org.maplibre.android.geometry.LatLng -import org.maplibre.android.style.sources.GeoJsonSource - -data class BusData( - var currentPosition: LatLng? = null, - var geoJsonSource: GeoJsonSource? = null, - var animator: ValueAnimator? = null -) diff --git a/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleData.kt b/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleData.kt index 992d6338..08fe0a87 100644 --- a/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleData.kt +++ b/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleData.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.data.response // ktlint-disable filename +package com.aws.amazonlocation.data.response data class MapStyleData( var styleNameDisplay: String? = null, diff --git a/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleInnerData.kt b/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleInnerData.kt index 66895eb3..17406202 100644 --- a/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleInnerData.kt +++ b/app/src/main/java/com/aws/amazonlocation/data/response/MapStyleInnerData.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.data.response // ktlint-disable filename +package com.aws.amazonlocation.data.response data class MapStyleInnerData( var mapName: String? = null, diff --git a/app/src/main/java/com/aws/amazonlocation/data/response/NavigationResponse.kt b/app/src/main/java/com/aws/amazonlocation/data/response/NavigationResponse.kt index dd47bbb5..49ef2387 100644 --- a/app/src/main/java/com/aws/amazonlocation/data/response/NavigationResponse.kt +++ b/app/src/main/java/com/aws/amazonlocation/data/response/NavigationResponse.kt @@ -28,10 +28,10 @@ class NavigationData( var country: String? = null, var isDataSuccess: Boolean = false ) { - fun getRegions(): String { - var mRegion = "" + fun getAddress(): String { + var mAddress = "" if (isDataSuccess) { - mRegion += if (!destinationAddress.isNullOrEmpty()) { + mAddress += if (!destinationAddress.isNullOrEmpty()) { destinationAddress } else if (!subRegion.isNullOrEmpty() && !region.isNullOrEmpty()) { "$subRegion, $region" @@ -43,8 +43,8 @@ class NavigationData( "" } } else { - mRegion = destinationAddress.toString() + mAddress = destinationAddress.toString() } - return mRegion + return mAddress } } diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/MainActivity.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/MainActivity.kt index 233d592f..96f5392b 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/MainActivity.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/MainActivity.kt @@ -513,7 +513,7 @@ class MainActivity : } } - fun openSingIn() { + fun openSignIn() { showProgress() mBottomSheetDialog?.hide() showViews(mBinding.signInWebView, mBinding.ivBackMain, mBinding.viewBottom) @@ -1139,7 +1139,7 @@ class MainActivity : SignInConnectInterface { override fun signIn(dialog: Dialog?) { mBottomSheetDialog = dialog - openSingIn() + openSignIn() } override fun continueToExplore(dialog: Dialog?) { @@ -1152,7 +1152,7 @@ class MainActivity : object : SignInRequiredInterface { override fun signInClick(dialog: Dialog?) { mBottomSheetDialog = dialog - openSingIn() + openSignIn() } override fun mayBeLaterClick(dialog: Dialog?) { diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/data_provider/DataProviderFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/data_provider/DataProviderFragment.kt index 2221da18..c732cc80 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/data_provider/DataProviderFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/data_provider/DataProviderFragment.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.data_provider // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.data_provider import android.content.DialogInterface import android.content.Intent diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/explore/ExploreFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/explore/ExploreFragment.kt index bd1ba1c7..688cdc43 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/explore/ExploreFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/explore/ExploreFragment.kt @@ -1163,7 +1163,7 @@ class ExploreFragment : it.navigationList[0].distance?.let { distance -> setNavigationTimeDialog( distance, - it.navigationList[0].getRegions(), + it.navigationList[0].getAddress(), ) } } @@ -1985,7 +1985,7 @@ class ExploreFragment : it.distance?.let { distance -> setNavigationTimeDialog( distance, - it.getRegions(), + it.getAddress(), ) } }.onError { @@ -4942,7 +4942,7 @@ class ExploreFragment : mMapHelper.moveCameraToLocation(it1) } mBaseActivity?.isTablet?.let { - if (mBaseActivity?.mSimulationUtils?.isSimulationBottomSheetVisible() == true && mBaseActivity?.mTrackingUtils?.isChangeDataProviderClicked == true && mBaseActivity?.mGeofenceUtils?.isChangeDataProviderClicked == true) { + if (mBaseActivity?.mSimulationUtils?.isSimulationBottomSheetVisible() == true || mBaseActivity?.mTrackingUtils?.isChangeDataProviderClicked == true || mBaseActivity?.mGeofenceUtils?.isChangeDataProviderClicked == true) { return@let } if (it) { diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/explore/NavigationAdapter.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/explore/NavigationAdapter.kt index 0af82213..2d6118dc 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/explore/NavigationAdapter.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/explore/NavigationAdapter.kt @@ -27,7 +27,7 @@ class NavigationAdapter( RecyclerView.ViewHolder(binding.root) { fun bind(data: NavigationData) { binding.apply { - tvNavigationAddress.text = data.getRegions() + tvNavigationAddress.text = data.getAddress() data.distance?.let { distance -> tvNavigationDistance.text = preferenceManager.getValue(KEY_UNIT_SYSTEM, "").let { unitSystem -> diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/language/LanguageFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/language/LanguageFragment.kt index e9f6f50c..75c2ab65 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/language/LanguageFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/language/LanguageFragment.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.language // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.language import android.os.Bundle import android.view.LayoutInflater diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleBottomSheetFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleBottomSheetFragment.kt index 852c35c9..5318f969 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleBottomSheetFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleBottomSheetFragment.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.map_style // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.map_style import android.annotation.SuppressLint import android.app.Dialog diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleFragment.kt index 10f14635..33bf4250 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleFragment.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.map_style // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.map_style import android.annotation.SuppressLint import android.content.DialogInterface diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleViewModel.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleViewModel.kt index d105b1c2..e71a03a4 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleViewModel.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/map_style/MapStyleViewModel.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.map_style // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.map_style import android.content.Context import androidx.lifecycle.ViewModel diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/region/RegionFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/region/RegionFragment.kt index 9f03a004..6be16583 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/region/RegionFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/region/RegionFragment.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.region // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.region import android.os.Bundle import android.view.LayoutInflater diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/setting/AWSCloudInformationFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/setting/AWSCloudInformationFragment.kt index 20a1193a..af2df79e 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/setting/AWSCloudInformationFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/setting/AWSCloudInformationFragment.kt @@ -266,7 +266,7 @@ class AWSCloudInformationFragment : } btnSignIn.setOnClickListener { - (activity as MainActivity).openSingIn() + (activity as MainActivity).openSignIn() } btnLogout.setOnClickListener { diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/terms_condition/TermsAndConditionFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/terms_condition/TermsAndConditionFragment.kt index aecd7358..bd70d916 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/terms_condition/TermsAndConditionFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/terms_condition/TermsAndConditionFragment.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.terms_condition // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.terms_condition import android.os.Bundle import android.view.LayoutInflater diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/tracking/TrackingHistoryAdapter.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/tracking/TrackingHistoryAdapter.kt index 914db1cc..ece5ca74 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/tracking/TrackingHistoryAdapter.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/tracking/TrackingHistoryAdapter.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.tracking // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.tracking import android.annotation.SuppressLint import android.view.LayoutInflater diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/unit_system/UnitSystemFragment.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/unit_system/UnitSystemFragment.kt index 7760b626..a14d61b8 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/unit_system/UnitSystemFragment.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/unit_system/UnitSystemFragment.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.unit_system // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.unit_system import android.os.Bundle import android.view.LayoutInflater diff --git a/app/src/main/java/com/aws/amazonlocation/ui/main/web_view/WebViewActivity.kt b/app/src/main/java/com/aws/amazonlocation/ui/main/web_view/WebViewActivity.kt index ccf2a3fa..524a18c0 100644 --- a/app/src/main/java/com/aws/amazonlocation/ui/main/web_view/WebViewActivity.kt +++ b/app/src/main/java/com/aws/amazonlocation/ui/main/web_view/WebViewActivity.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.ui.main.web_view // ktlint-disable package-name +package com.aws.amazonlocation.ui.main.web_view import android.annotation.SuppressLint import android.os.Bundle diff --git a/app/src/main/java/com/aws/amazonlocation/utils/AWSLocationHelper.kt b/app/src/main/java/com/aws/amazonlocation/utils/AWSLocationHelper.kt index a60b25bc..9746567f 100644 --- a/app/src/main/java/com/aws/amazonlocation/utils/AWSLocationHelper.kt +++ b/app/src/main/java/com/aws/amazonlocation/utils/AWSLocationHelper.kt @@ -327,7 +327,9 @@ class AWSLocationHelper( this.language = getLanguageCode() this.indexName = indexName this.maxResults = SEARCH_MAX_SUGGESTION_RESULT - this.biasPosition = listOf(lng ?: 0.0, lat ?: 0.0) + if (lng != null && lat != null) { + this.biasPosition = listOf(lng, lat) + } } } @@ -828,7 +830,7 @@ class AWSLocationHelper( deviceId: String, ): UpdateBatchLocationResponse { if (getIdentityId() == null) { - UpdateBatchLocationResponse("Identity is is null", false) + UpdateBatchLocationResponse("Identity is null", false) } val map: MutableMap = getIdentityId()!!.split(":").let { splitStringList -> diff --git a/app/src/main/java/com/aws/amazonlocation/utils/Hashing.kt b/app/src/main/java/com/aws/amazonlocation/utils/Hashing.kt index 6c5fa85a..85febe81 100644 --- a/app/src/main/java/com/aws/amazonlocation/utils/Hashing.kt +++ b/app/src/main/java/com/aws/amazonlocation/utils/Hashing.kt @@ -1,17 +1,13 @@ package com.aws.amazonlocation.utils -import java.io.UnsupportedEncodingException -import java.net.URLEncoder import java.nio.charset.Charset import java.nio.charset.StandardCharsets import java.security.MessageDigest import javax.crypto.Mac import javax.crypto.spec.SecretKeySpec -import software.amazon.location.auth.utils.Constants.DEFAULT_ENCODING internal const val HASHING_ALGORITHM = "SHA-256" internal const val MAC_ALGORITHM = "HmacSHA256" -internal const val ENCODED_CHARACTER_REGEX = "%[0-9A-Fa-f]{2}" internal fun hash(value: String): String { val bytes = value.toByteArray() @@ -35,40 +31,4 @@ internal fun hmacSha256(key: String, data: String) = internal fun ByteArray.toHexString(): String{ return joinToString("") { "%02x".format(it) } -} - -fun urlEncode(value: String?, path: Boolean): String { - val encodedCharactersPattern = Regex(ENCODED_CHARACTER_REGEX) - if (value == null) { - return "" - } - - return try { - val encoded = URLEncoder.encode(value, DEFAULT_ENCODING) - - val buffer = StringBuffer(encoded.length) - val matcher = encodedCharactersPattern.findAll(encoded) - var lastIndex = 0 - - for (result in matcher) { - buffer.append(encoded, lastIndex, result.range.first) - - var replacement = result.value - when (replacement) { - "+" -> replacement = "%20" - "%2A" -> replacement = "*" - "%7E" -> replacement = "~" - "%2F" -> if (path) replacement = "/" - } - - buffer.append(replacement) - lastIndex = result.range.last + 1 - } - - buffer.append(encoded, lastIndex, encoded.length) - buffer.toString() - - } catch (ex: UnsupportedEncodingException) { - throw RuntimeException(ex) - } } \ No newline at end of file diff --git a/app/src/main/java/com/aws/amazonlocation/utils/geofence_helper/GeofenceHelper.kt b/app/src/main/java/com/aws/amazonlocation/utils/geofence_helper/GeofenceHelper.kt index 1466ace1..fc3131cd 100644 --- a/app/src/main/java/com/aws/amazonlocation/utils/geofence_helper/GeofenceHelper.kt +++ b/app/src/main/java/com/aws/amazonlocation/utils/geofence_helper/GeofenceHelper.kt @@ -1,4 +1,4 @@ -package com.aws.amazonlocation.utils.geofence_helper // ktlint-disable package-name +package com.aws.amazonlocation.utils.geofence_helper import android.content.Context import android.widget.SeekBar diff --git a/app/src/main/res/values-pt/string.xml b/app/src/main/res/values-pt/string.xml index b0f4c0e6..5696702c 100644 --- a/app/src/main/res/values-pt/string.xml +++ b/app/src/main/res/values-pt/string.xml @@ -165,7 +165,7 @@ Rota não encontrado. Não rota encontrado Distância é maior do que 400 km, não posso calcular através da Esri, gentilmente interruptor para AQUI fornecedor - Distância é maior do que %s mi, não posso calcular através da Esri, gentilmente interruptor para AQUI fornecedor + Distância é maior do que %s mi, não posso calcular através da Esri, gentilmente interruptor para AQUI fornecedor Em Fonte de dados Esri, pontos de referência pelo carro e caminhão mosto ser dentro 400 km, e pontos de referência pelo caminhar mosto ser dentro 40 km. Em Fonte de dados Esri, pontos de referência pelo carro e caminhão mosto ser dentro %smi, e pontos de referência pelo caminhar mosto ser dentro %smi. Conectar AWS Conta diff --git a/app/src/test/java/com/aws/amazonlocation/data/response/ResponseDataTest.kt b/app/src/test/java/com/aws/amazonlocation/data/response/ResponseDataTest.kt index bca1c05c..ed53c648 100644 --- a/app/src/test/java/com/aws/amazonlocation/data/response/ResponseDataTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/data/response/ResponseDataTest.kt @@ -15,7 +15,6 @@ import com.aws.amazonlocation.mock.TEST_DATA_2 import com.aws.amazonlocation.mock.TEST_DATA_3 import com.aws.amazonlocation.mock.TEST_DATA_4 import com.aws.amazonlocation.mock.TEST_DATA_5 -import com.aws.amazonlocation.mock.TEST_DATA_6 import com.aws.amazonlocation.mock.TEST_DATA_LAT import com.aws.amazonlocation.mock.TEST_DATA_LNG import com.aws.amazonlocation.mock.TEST_FAILED_ADD_GEOFENCE_DATA @@ -42,26 +41,10 @@ class ResponseDataTest { @Test fun navigationDataTest() { val navigationData = Responses.RESPONSE_NAVIGATION_DATA_CAR_STEP_1 - navigationData.getRegions() navigationData.destinationAddress = TEST_DATA - navigationData.getRegions() navigationData.subRegion = "" - navigationData.getRegions() navigationData.region = "" - navigationData.getRegions() navigationData.country = "" - navigationData.getRegions() - navigationData.region - navigationData.country - navigationData.duration - navigationData.distance - navigationData.startLat - navigationData.startLng - navigationData.endLat - navigationData.endLng - navigationData.destinationAddress - navigationData.subRegion - navigationData.country Assert.assertTrue(TEST_FAILED_NAVIGATION_DATA, navigationData.country == "") } @@ -101,8 +84,6 @@ class ResponseDataTest { @Test fun searchResponseTest() { val searchResponse = Responses.SEARCH_RESPONSE_TAJ - searchResponse.latitude = searchResponse.latitude - searchResponse.longitude = searchResponse.longitude searchResponse.searchPlaceIndexForPositionResult = SearchPlaceIndexForPositionResponse { results = listOf( SearchForPositionResult { @@ -110,7 +91,7 @@ class ResponseDataTest { place = Place { country = TEST_DATA_2 geometry = PlaceGeometry { - point = listOf(TEST_DATA_LAT, TEST_DATA_LNG) + point = listOf(TEST_DATA_LNG, TEST_DATA_LAT) } interpolated = false label = TEST_DATA_3 @@ -123,10 +104,10 @@ class ResponseDataTest { dataSource = ESRI language = TEST_DATA_1 maxResults = 1 - position = listOf(TEST_DATA_LAT, TEST_DATA_LNG) + position = listOf(TEST_DATA_LNG, TEST_DATA_LAT) } } - Assert.assertTrue(TEST_FAILED_SEARCH_DATA, searchResponse.latitude == TEST_DATA_LNG) + Assert.assertTrue(TEST_FAILED_SEARCH_DATA, searchResponse.latitude == TEST_DATA_LAT) } @Test @@ -233,7 +214,6 @@ class ResponseDataTest { isSelected = false, mapInnerData = null ) - mapStyleData.isDisable = mapStyleData.isDisable mapStyleData.mapInnerData = arrayListOf(data) Assert.assertTrue(TEST_FAILED_MAP_STYLE_DATA, !mapStyleData.isSelected) } diff --git a/app/src/test/java/com/aws/amazonlocation/mock/BusDataTest.kt b/app/src/test/java/com/aws/amazonlocation/mock/BusDataTest.kt deleted file mode 100644 index cb01b61d..00000000 --- a/app/src/test/java/com/aws/amazonlocation/mock/BusDataTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.aws.amazonlocation.mock -import com.aws.amazonlocation.data.response.BusData -import org.junit.Assert.assertEquals -import org.junit.Test -import org.maplibre.android.geometry.LatLng - -class BusDataTest { - - @Test - fun testCurrentPosition() { - val busData = BusData( - currentPosition = LatLng(1.0, 2.0), - geoJsonSource = null, - animator =null - ) - busData.currentPosition = LatLng(1.0, 2.0) - busData.geoJsonSource = null - busData.animator = null - val expectedLatLng = LatLng(1.0, 2.0) - assertEquals(expectedLatLng, busData.currentPosition) - } -} \ No newline at end of file diff --git a/app/src/test/java/com/aws/amazonlocation/mock/FilterOptionTest.kt b/app/src/test/java/com/aws/amazonlocation/mock/FilterOptionTest.kt index d23b5968..47fd2054 100644 --- a/app/src/test/java/com/aws/amazonlocation/mock/FilterOptionTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/mock/FilterOptionTest.kt @@ -39,8 +39,6 @@ class FilterOptionTest { fun `FilterOption inequality`() { val filterOption1 = FilterOption(option4, isSelected = true, isApplyFilter = true) val filterOption2 = FilterOption(option5, isSelected = false, isApplyFilter = false) - filterOption1.isApplyFilter = filterOption1.isApplyFilter - filterOption1.isSelected = filterOption1.isSelected assertEquals(false, filterOption1 == filterOption2) } } \ No newline at end of file diff --git a/app/src/test/java/com/aws/amazonlocation/mock/NavigationDataTest.kt b/app/src/test/java/com/aws/amazonlocation/mock/NavigationDataTest.kt index 3a0d1a64..372b6b0b 100644 --- a/app/src/test/java/com/aws/amazonlocation/mock/NavigationDataTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/mock/NavigationDataTest.kt @@ -64,7 +64,8 @@ class NavigationDataTest { } @Test - fun testGetRegionsWithDataSuccess() { + fun testGetAddressWithDataSuccess() { + // `getAddress()` should return `destinationAddress` directly, regardless of other fields. val navigationData = NavigationData( destinationAddress = CITY_NAME, region = REGION_NAME, @@ -79,57 +80,61 @@ class NavigationDataTest { navigationData.endLat = 21.5511451 navigationData.endLng = 21.5511451 navigationData.isDataSuccess = true - val result = navigationData.getRegions() + val result = navigationData.getAddress() assertEquals(CITY_NAME, result) } @Test - fun testGetRegionsWithDataSuccessSubRegion() { + fun testGetAddressWithDataSuccessSubRegion() { + // `getAddress()` should return `country` if both are available. val navigationData = NavigationData( subRegion = SUB_REGION_NAME, country = COUNTRY_NAME, isDataSuccess = true ) - val result = navigationData.getRegions() + val result = navigationData.getAddress() assertEquals(COUNTRY_NAME, result) } @Test - fun testGetRegionsWithDataSuccessRegion() { + fun testGetAddressWithDataSuccessRegion() { + // `getAddress()` should concatenate `region, country` as the result. val navigationData = NavigationData( region = REGION_NAME, country = COUNTRY_NAME, isDataSuccess = true ) - val result = navigationData.getRegions() + val result = navigationData.getAddress() assertEquals("$REGION_NAME, $COUNTRY_NAME", result) } @Test - fun testGetRegionsWithDataSuccessCountry() { + fun testGetAddressWithDataSuccessCountry() { + // `getAddress()` should return the `country` value as the address. val navigationData = NavigationData( country = COUNTRY_NAME, isDataSuccess = true ) - val result = navigationData.getRegions() + val result = navigationData.getAddress() assertEquals(COUNTRY_NAME, result) } @Test - fun testGetRegionsWithDataFailure() { + fun testGetAddressWithDataFailure() { + // of `destinationAddress` directly, irrespective of other fields. val navigationData = NavigationData( destinationAddress = CITY_NAME, isDataSuccess = false ) - val result = navigationData.getRegions() + val result = navigationData.getAddress() assertEquals(CITY_NAME, result) } diff --git a/app/src/test/java/com/aws/amazonlocation/mock/Responses.kt b/app/src/test/java/com/aws/amazonlocation/mock/Responses.kt index faf5950e..4763cbfe 100644 --- a/app/src/test/java/com/aws/amazonlocation/mock/Responses.kt +++ b/app/src/test/java/com/aws/amazonlocation/mock/Responses.kt @@ -447,7 +447,7 @@ object Responses { GeofenceGeometry { circle = Circle { - center = listOf(TEST_DATA_LAT_1, TEST_DATA_LNG_1) + center = listOf(TEST_DATA_LNG_1, TEST_DATA_LAT_1) radius = 100.00 } } @@ -461,7 +461,7 @@ object Responses { GeofenceGeometry { circle = Circle { - center = listOf(TEST_DATA_LAT_1, TEST_DATA_LNG_1) + center = listOf(TEST_DATA_LNG_1, TEST_DATA_LAT_1) radius = 100.00 } } @@ -484,7 +484,7 @@ object Responses { place = Place { country = "IND" geometry = PlaceGeometry { - point = listOf(TEST_DATA_LAT, TEST_DATA_LNG) + point = listOf(TEST_DATA_LNG, TEST_DATA_LAT) } interpolated = false label = "The Taj, Mumbai, Mahārāshtra, IND" @@ -497,11 +497,11 @@ object Responses { dataSource = "ESRI" language = "en" maxResults = 1 - position = listOf(TEST_DATA_LAT, TEST_DATA_LNG) + position = listOf(TEST_DATA_LNG, TEST_DATA_LAT) } }, - latitude = TEST_DATA_LNG, - longitude = TEST_DATA_LAT, + latitude = TEST_DATA_LAT, + longitude = TEST_DATA_LNG, ) val RESPONSE_ADDRESS_LINE_FROM_LAT_LNG = diff --git a/app/src/test/java/com/aws/amazonlocation/mock/StopCoordinateTest.kt b/app/src/test/java/com/aws/amazonlocation/mock/StopCoordinateTest.kt index 1b701b6b..42822b70 100644 --- a/app/src/test/java/com/aws/amazonlocation/mock/StopCoordinateTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/mock/StopCoordinateTest.kt @@ -19,10 +19,6 @@ class StopCoordinateTest { properties = Properties(2, STOP_123, BUS_STOP), type = FEATURE ) - stopCoordinate.geometry = Geometry(listOf(1.0, 2.0), POINT) - stopCoordinate.id = 1 - stopCoordinate.properties = Properties(2, STOP_123, BUS_STOP) - stopCoordinate.type = FEATURE } @Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetLanguageTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetLanguageTest.kt index e2b0a914..875b1264 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetLanguageTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetLanguageTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.generalutils import android.content.Context import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.getLanguageCode import com.aws.amazonlocation.utils.setLocale import org.junit.Assert diff --git a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetRegionTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetRegionTest.kt index 21c7606a..23e6ef17 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetRegionTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetRegionTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.generalutils import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.getRegion import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetUserNameTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetUserNameTest.kt index 7d42d216..a1032126 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetUserNameTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsGetUserNameTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.generalutils import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.getUserName import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsIsInternetAvailableTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsIsInternetAvailableTest.kt index bd50930e..ce0d5bca 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsIsInternetAvailableTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsIsInternetAvailableTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.generalutils import android.content.Context import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.setConnectivity import com.aws.amazonlocation.utils.isInternetAvailable import org.junit.Assert diff --git a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateGrabMapEnableTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateGrabMapEnableTest.kt index a301c79f..3c7b2ef3 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateGrabMapEnableTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateGrabMapEnableTest.kt @@ -3,7 +3,7 @@ package com.aws.amazonlocation.utils.generalutils import android.content.Context import com.aws.amazonlocation.BaseTest import com.aws.amazonlocation.data.enum.AuthEnum -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.KEY_CLOUD_FORMATION_STATUS import com.aws.amazonlocation.utils.KEY_MAP_NAME import com.aws.amazonlocation.utils.KEY_USER_REGION diff --git a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateLatLngTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateLatLngTest.kt index df5d484b..76504776 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateLatLngTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/generalutils/GeneralUtilsValidateLatLngTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.generalutils import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.validateLatLng import org.junit.Assert import org.junit.Test @@ -20,13 +20,13 @@ class GeneralUtilsValidateLatLngTest : BaseTest() { @Test fun testValidateLatLngInvalidLat() { - val result = validateLatLng(LAT_LNG_VALID_LNG_STRING) + val result = validateLatLng(LAT_LNG_VALID_LAT_STRING) Assert.assertTrue(TEST_FAILED_DUE_TO_INVALID_LATITUDE, result == null) } @Test fun testValidateLatLngInvalidLng() { - val result = validateLatLng("") + val result = validateLatLng(LAT_LNG_VALID_LNG_STRING) Assert.assertTrue(TEST_FAILED_DUE_TO_INVALID_LONGITUDE, result == null) } } diff --git a/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetDefaultConfigTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetDefaultConfigTest.kt index acb96d0e..3d81b591 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetDefaultConfigTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetDefaultConfigTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.preferencemanager import com.aws.amazonlocation.BaseTest import com.aws.amazonlocation.data.enum.AuthEnum -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.KEY_CLOUD_FORMATION_STATUS import com.aws.amazonlocation.utils.KEY_POOL_ID import com.aws.amazonlocation.utils.KEY_USER_DOMAIN diff --git a/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetValueGetValueTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetValueGetValueTest.kt index 8d992944..dcce96c3 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetValueGetValueTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/preferencemanager/PreferenceManagerSetValueGetValueTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.preferencemanager import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.PreferenceManager import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMeasurementTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMeasurementTest.kt index eea52ef7..47ad59f7 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMeasurementTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMeasurementTest.kt @@ -16,12 +16,12 @@ class TurfMeasurementTest { @Test fun turfMeasurementDistanceTest() { val distance = TurfMeasurement.distance( - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG), - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG) + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT), + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT) ) Assert.assertTrue(!distance.isNaN()) val destination = TurfMeasurement.destination( - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG), + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT), 10.654654, 10.5, TurfConstants.UNIT_MILES diff --git a/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsMultiPolygonTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsMultiPolygonTest.kt index 5eead707..6555b4f1 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsMultiPolygonTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsMultiPolygonTest.kt @@ -20,9 +20,9 @@ class TurfMetaCoordsMultiPolygonTest { mutableListOf( mutableListOf( mutableListOf( - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG), - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG), - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG) + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT), + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT), + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT) ) ) ) @@ -38,9 +38,9 @@ class TurfMetaCoordsMultiPolygonTest { mutableListOf( mutableListOf( mutableListOf( - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG), - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG), - Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG) + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT), + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT), + Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT) ) ) ) diff --git a/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsTest.kt index efd9bdf9..5dd5483a 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/turf/TurfMetaCoordsTest.kt @@ -17,7 +17,7 @@ class TurfMetaCoordsTest { @Test fun turfMetaCordTest() { - val pointList = TurfMeta.coordAll(Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG)) + val pointList = TurfMeta.coordAll(Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT)) Assert.assertTrue(pointList.isNotEmpty()) } @@ -27,9 +27,9 @@ class TurfMetaCoordsTest { MultiPoint.fromLngLats( mutableListOf( Point.fromLngLat( - TEST_DATA_LAT, - TEST_DATA_LNG - ), Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG) + TEST_DATA_LNG, + TEST_DATA_LAT + ), Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT) ) ) ) @@ -42,9 +42,9 @@ class TurfMetaCoordsTest { LineString.fromLngLats( mutableListOf( Point.fromLngLat( - TEST_DATA_LAT, - TEST_DATA_LNG - ), Point.fromLngLat(TEST_DATA_LAT, TEST_DATA_LNG) + TEST_DATA_LNG, + TEST_DATA_LAT + ), Point.fromLngLat(TEST_DATA_LNG, TEST_DATA_LAT) ) ) ) @@ -58,16 +58,16 @@ class TurfMetaCoordsTest { mutableListOf( mutableListOf( Point.fromLngLat( - TEST_DATA_LAT, - TEST_DATA_LNG + TEST_DATA_LNG, + TEST_DATA_LAT ), Point.fromLngLat( - TEST_DATA_LAT, - TEST_DATA_LNG + TEST_DATA_LNG, + TEST_DATA_LAT ), Point.fromLngLat( - TEST_DATA_LAT, - TEST_DATA_LNG + TEST_DATA_LNG, + TEST_DATA_LAT ) ) ) diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsCountryToUnitSystemTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsCountryToUnitSystemTest.kt index 221051ab..d941ab12 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsCountryToUnitSystemTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsCountryToUnitSystemTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsDefaultIdentityPoolIdTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsDefaultIdentityPoolIdTest.kt index 851113db..6903f5c3 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsDefaultIdentityPoolIdTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsDefaultIdentityPoolIdTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest import com.aws.amazonlocation.BuildConfig -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import com.aws.amazonlocation.utils.regionDisplayName import com.aws.amazonlocation.utils.regionList diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDeviceIdTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDeviceIdTest.kt index 5b39c6d8..1aa3b3ca 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDeviceIdTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDeviceIdTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.units import android.provider.Settings import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDistanceUnitTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDistanceUnitTest.kt index 561f101b..e9f20298 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDistanceUnitTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetDistanceUnitTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.KILOMETERS import com.aws.amazonlocation.utils.MILES import com.aws.amazonlocation.utils.Units diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsNewTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsNewTest.kt index 4eeff924..5652a91c 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsNewTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsNewTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.units import android.content.Context import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsTest.kt index c57f8ae3..ae93583c 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetMetricsTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.units import android.content.Context import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetSimulationWebSocketUrlTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetSimulationWebSocketUrlTest.kt index 23102000..47b8f169 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetSimulationWebSocketUrlTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetSimulationWebSocketUrlTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest import com.aws.amazonlocation.BuildConfig -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetTimeTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetTimeTest.kt index b19793ca..08304fad 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetTimeTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsGetTimeTest.kt @@ -2,7 +2,7 @@ package com.aws.amazonlocation.utils.units import android.content.Context import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsGPSEnabledTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsGPSEnabledTest.kt index cdbc0ecb..5407e52b 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsGPSEnabledTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsGPSEnabledTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.setGPSEnabled import com.aws.amazonlocation.utils.Units import org.junit.Assert diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsMetricTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsMetricTest.kt index c894bb85..0c05923f 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsMetricTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsIsMetricTest.kt @@ -1,16 +1,18 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports -import com.aws.amazonlocation.utils.KILOMETERS -import com.aws.amazonlocation.utils.MILES +import com.aws.amazonlocation.mock.AUTOMATIC +import com.aws.amazonlocation.mock.IMPERIAL +import com.aws.amazonlocation.mock.LOCALE_IN +import com.aws.amazonlocation.mock.METRIC +import com.aws.amazonlocation.mock.TEST_FAILED_DUE_TO_INCORRECT_DATA import com.aws.amazonlocation.utils.Units +import java.util.Locale import org.junit.Assert import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config -import java.util.Locale @RunWith(RobolectricTestRunner::class) @Config() diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsKiloMeterToMeterTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsKiloMeterToMeterTest.kt index 7bdc291b..a1281587 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsKiloMeterToMeterTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsKiloMeterToMeterTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsMilesToFeetTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsMilesToFeetTest.kt index 683439f6..fe722e20 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsMilesToFeetTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsMilesToFeetTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsToLowerUnitTest.kt b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsToLowerUnitTest.kt index 67a8e64d..2fe94002 100644 --- a/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsToLowerUnitTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/utils/units/UnitsToLowerUnitTest.kt @@ -1,7 +1,7 @@ package com.aws.amazonlocation.utils.units import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.utils.Units import org.junit.Assert import org.junit.Test diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMCalculateDistance.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMCalculateDistance.kt index b5a32404..f7666f98 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMCalculateDistance.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMCalculateDistance.kt @@ -10,7 +10,7 @@ import com.aws.amazonlocation.data.datasource.RemoteDataSourceImpl import com.aws.amazonlocation.data.repository.LocationSearchImp import com.aws.amazonlocation.domain.`interface`.DistanceInterface import com.aws.amazonlocation.domain.usecase.LocationSearchUseCase -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.explore.ExploreViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressFromLatLng.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressFromLatLng.kt index 1bff4b1b..9ceaa9b8 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressFromLatLng.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressFromLatLng.kt @@ -8,7 +8,7 @@ import com.aws.amazonlocation.data.datasource.RemoteDataSourceImpl import com.aws.amazonlocation.data.repository.LocationSearchImp import com.aws.amazonlocation.domain.`interface`.NavigationDataInterface import com.aws.amazonlocation.domain.usecase.LocationSearchUseCase -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.explore.ExploreViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressLineFromLatLng.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressLineFromLatLng.kt index bbe220ce..a18000e0 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressLineFromLatLng.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMGetAddressLineFromLatLng.kt @@ -8,7 +8,7 @@ import com.aws.amazonlocation.data.datasource.RemoteDataSourceImpl import com.aws.amazonlocation.data.repository.LocationSearchImp import com.aws.amazonlocation.domain.`interface`.SearchDataInterface import com.aws.amazonlocation.domain.usecase.LocationSearchUseCase -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.explore.ExploreViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetFilterData.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetFilterData.kt index e8a6ae20..f98041c0 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetFilterData.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetFilterData.kt @@ -4,7 +4,7 @@ import android.content.Context import androidx.arch.core.executor.testing.InstantTaskExecutorRule import com.aws.amazonlocation.BaseTest import com.aws.amazonlocation.domain.usecase.LocationSearchUseCase -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.explore.ExploreViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetMapListData.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetMapListData.kt index d75a4c6d..5737f05e 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetMapListData.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/explore/ExploreVMSetMapListData.kt @@ -4,7 +4,7 @@ import android.content.Context import androidx.arch.core.executor.testing.InstantTaskExecutorRule import com.aws.amazonlocation.BaseTest import com.aws.amazonlocation.domain.usecase.LocationSearchUseCase -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.explore.ExploreViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/geofence/GeofenceVMGeofenceDeleteTest.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/geofence/GeofenceVMGeofenceDeleteTest.kt index 0a8e87fb..00294200 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/geofence/GeofenceVMGeofenceDeleteTest.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/geofence/GeofenceVMGeofenceDeleteTest.kt @@ -72,7 +72,7 @@ class GeofenceVMGeofenceDeleteTest : BaseTest() { updateTime = Instant.now() geometry = GeofenceGeometry { circle = Circle { - center = listOf(TEST_DATA_LAT_1, TEST_DATA_LNG_1) + center = listOf(TEST_DATA_LNG_1, TEST_DATA_LAT_1) radius = 100.0 } } @@ -91,7 +91,7 @@ class GeofenceVMGeofenceDeleteTest : BaseTest() { updateTime = Instant.now() geometry = GeofenceGeometry { circle = Circle { - center = listOf(TEST_DATA_LAT_1, TEST_DATA_LNG_1) + center = listOf(TEST_DATA_LNG_1, TEST_DATA_LAT_1) radius = 100.0 } } @@ -129,7 +129,7 @@ class GeofenceVMGeofenceDeleteTest : BaseTest() { updateTime = Instant.now() geometry = GeofenceGeometry { circle = Circle { - center = listOf(TEST_DATA_LAT_1, TEST_DATA_LNG_1) + center = listOf(TEST_DATA_LNG_1, TEST_DATA_LAT_1) radius = 100.00 } } diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetEsriAndHereListData.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetEsriAndHereListData.kt index 69357100..522992c8 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetEsriAndHereListData.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetEsriAndHereListData.kt @@ -4,7 +4,7 @@ import android.content.Context import androidx.arch.core.executor.testing.InstantTaskExecutorRule import com.aws.amazonlocation.BaseTest import com.aws.amazonlocation.data.response.MapStyleData -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.map_style.MapStyleViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetFilterData.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetFilterData.kt index 9ba57521..7ca8909a 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetFilterData.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetFilterData.kt @@ -3,7 +3,7 @@ package com.aws.amazonlocation.viewmodel.mapstyle import android.content.Context import androidx.arch.core.executor.testing.InstantTaskExecutorRule import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.map_style.MapStyleViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetHereMapListData.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetHereMapListData.kt index f6cd1b34..f06af78d 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetHereMapListData.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/mapstyle/MapStyleVMSetHereMapListData.kt @@ -3,7 +3,7 @@ package com.aws.amazonlocation.viewmodel.mapstyle import android.content.Context import androidx.arch.core.executor.testing.InstantTaskExecutorRule import com.aws.amazonlocation.BaseTest -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.map_style.MapStyleViewModel import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/simulation/SimulationVMGetGeofenceList.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/simulation/SimulationVMGetGeofenceList.kt index 1b2ae033..1badce39 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/simulation/SimulationVMGetGeofenceList.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/simulation/SimulationVMGetGeofenceList.kt @@ -8,7 +8,7 @@ import com.aws.amazonlocation.data.datasource.RemoteDataSourceImpl import com.aws.amazonlocation.data.repository.GeofenceImp import com.aws.amazonlocation.domain.`interface`.GeofenceAPIInterface import com.aws.amazonlocation.domain.usecase.GeofenceUseCase -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.simulation.SimulationViewModel import com.aws.amazonlocation.utils.GeofenceCons import com.aws.amazonlocation.utils.simulationCollectionName diff --git a/app/src/test/java/com/aws/amazonlocation/viewmodel/tracking/TrackingVMGetGeofenceList.kt b/app/src/test/java/com/aws/amazonlocation/viewmodel/tracking/TrackingVMGetGeofenceList.kt index 212a96c2..5f8ed58a 100644 --- a/app/src/test/java/com/aws/amazonlocation/viewmodel/tracking/TrackingVMGetGeofenceList.kt +++ b/app/src/test/java/com/aws/amazonlocation/viewmodel/tracking/TrackingVMGetGeofenceList.kt @@ -8,7 +8,7 @@ import com.aws.amazonlocation.data.datasource.RemoteDataSourceImpl import com.aws.amazonlocation.data.repository.GeofenceImp import com.aws.amazonlocation.domain.`interface`.GeofenceAPIInterface import com.aws.amazonlocation.domain.usecase.GeofenceUseCase -import com.aws.amazonlocation.mock.* // ktlint-disable no-wildcard-imports +import com.aws.amazonlocation.mock.* import com.aws.amazonlocation.ui.main.tracking.TrackingViewModel import com.aws.amazonlocation.utils.GeofenceCons import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/jacoco.gradle b/jacoco.gradle index ad97dd92..9e51c82d 100644 --- a/jacoco.gradle +++ b/jacoco.gradle @@ -55,6 +55,7 @@ ext.excludes = [ '**/*LatencyChecker*', '**/*KeyBoardUtils*', '**/*AmazonLocationApp*', + '**/*NavigationData*', // butterKnife '**/*$ViewInjector*.*', '**/*$ViewBinder*.*', From 293f3defacd5a7353add71248487cdb02f9e7c97 Mon Sep 17 00:00:00 2001 From: shah Date: Wed, 16 Oct 2024 15:54:38 +0530 Subject: [PATCH 2/2] fix: rights label updated ALS-1806 --- app/src/main/res/values-ar/string.xml | 2 +- app/src/main/res/values-de/string.xml | 2 +- app/src/main/res/values-es/string.xml | 2 +- app/src/main/res/values-fr/string.xml | 2 +- app/src/main/res/values-hi/string.xml | 2 +- app/src/main/res/values-it/string.xml | 2 +- app/src/main/res/values-iw/string.xml | 2 +- app/src/main/res/values-ja/string.xml | 2 +- app/src/main/res/values-ko/string.xml | 2 +- app/src/main/res/values-pt/string.xml | 2 +- app/src/main/res/values-zh-rCN/string.xml | 2 +- app/src/main/res/values-zh-rTW/string.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/main/res/values-ar/string.xml b/app/src/main/res/values-ar/string.xml index b5bb0a31..a9bf68aa 100644 --- a/app/src/main/res/values-ar/string.xml +++ b/app/src/main/res/values-ar/string.xml @@ -179,7 +179,7 @@ تعلم المزيد أهلا بك to\nAmazon الموقع نسخة تجريبية استمر - © 2023، Amazon الويب خدمات، شركة أو لها الشركات التابعة. جميع حقوق محجوز. + © 2024، Amazon الويب خدمات، شركة أو لها الشركات التابعة. جميع حقوق محجوز. بواسطة تنزيل، تثبيت، أو باستخدام ال Amazon الموقع نسخة تجريبية التطبيق، أنت يوافق إلى ال التطبيقات **الشروط & الشروط** من أجل استخدم. بواسطة تنزيل، تثبيت، أو باستخدام ال Amazon الموقع نسخة تجريبية التطبيق، أنت يوافق إلى ال التطبيقات **الشروط & الشروط** من أجل استخدم. الشروط & الشروط diff --git a/app/src/main/res/values-de/string.xml b/app/src/main/res/values-de/string.xml index 8449c4aa..6a64f846 100644 --- a/app/src/main/res/values-de/string.xml +++ b/app/src/main/res/values-de/string.xml @@ -179,7 +179,7 @@ Lernen Mehr Willkommen to\nAmazon Standort Demoversion Weiter - © 2023, Amazon Web Dienstleistungen, Inc. oder seine verbundene Unternehmen. Alles Rechte reserviert. + © 2024, Amazon Web Dienstleistungen, Inc. oder seine verbundene Unternehmen. Alles Rechte reserviert. Von wird heruntergeladen, installieren, oder unter Verwendung von die Amazon Standort Demoversion App, Sie zustimmen zu die Apps\'s **Bedingungen & Bedingungen** zum verwenden. Von wird heruntergeladen, installieren, oder unter Verwendung von die Amazon Standort Demoversion App, Sie zustimmen zu die Apps\'s **Bedingungen & Bedingungen** zum verwenden. Bedingungen & Bedingungen diff --git a/app/src/main/res/values-es/string.xml b/app/src/main/res/values-es/string.xml index 0bfc82d0..f0acac39 100644 --- a/app/src/main/res/values-es/string.xml +++ b/app/src/main/res/values-es/string.xml @@ -179,7 +179,7 @@ Aprenda Más Bienvenido to\nAmazon Ubicación Demo Continuar - © 2023, Amazon Web Servicios, Cía. o sus afiliados. Todos derechos reservado. + © 2024, Amazon Web Servicios, Cía. o sus afiliados. Todos derechos reservado. Por descargando, instalar, o usando la Amazon Ubicación Demo Aplicación, tú acordar a la Apps\'s **Términos y Condiciones** por usar. Por descargando, instalar, o usando la Amazon Ubicación Demo Aplicación, tú acordar a la Apps\'s **Términos y Condiciones** por usar. Términos y Condiciones diff --git a/app/src/main/res/values-fr/string.xml b/app/src/main/res/values-fr/string.xml index 1711ce73..792252f8 100644 --- a/app/src/main/res/values-fr/string.xml +++ b/app/src/main/res/values-fr/string.xml @@ -179,7 +179,7 @@ Apprenez Plus Bienvenue to\nAmazon Emplacement Démo Poursuivre - © 2023, Amazon Web Des services, Inc. ou ses affiliés. Tous droits réservé. + © 2024, Amazon Web Des services, Inc. ou ses affiliés. Tous droits réservé. Par téléchargement, installation, ou en utilisant le Amazon Emplacement Démo Application, vous d\'accord pour le Applis **Termes et Conditions** pour utiliser. Par téléchargement, installation, ou en utilisant le Amazon Emplacement Démo Application, vous d\'accord pour le Applis **Termes et Conditions** pour utiliser. Termes et Conditions diff --git a/app/src/main/res/values-hi/string.xml b/app/src/main/res/values-hi/string.xml index 219b1dab..eb38dfd5 100644 --- a/app/src/main/res/values-hi/string.xml +++ b/app/src/main/res/values-hi/string.xml @@ -179,7 +179,7 @@ सीखें ज़्यादा वेलकम to\nAmazon लोकेशन डेमो जारी रखें - © 2023, Amazon वेब सेवाएँ, निगमित या इसके सहयोगी कंपनियों। सभी अधिकार आरक्षित। + © 2024, Amazon वेब सेवाएँ, निगमित या इसके सहयोगी कंपनियों। सभी अधिकार आरक्षित। द्वारा डाउनलोड कर रहा है, स्थापित कर रहा है, या इस्तेमाल करते हुए यह Amazon लोकेशन डेमो ऐप, आप सहमत हैं को यह ऐप्लिकेशन\'s **शर्तें & शर्तें** के लिए उपयोग करें। द्वारा डाउनलोड कर रहा है, स्थापित कर रहा है, या इस्तेमाल करते हुए यह Amazon लोकेशन डेमो ऐप, आप सहमत हैं को यह ऐप्लिकेशन\'s **शर्तें & शर्तें** के लिए उपयोग करें। शर्तें & शर्तेँ diff --git a/app/src/main/res/values-it/string.xml b/app/src/main/res/values-it/string.xml index 7b4fb8ff..dc08ab47 100644 --- a/app/src/main/res/values-it/string.xml +++ b/app/src/main/res/values-it/string.xml @@ -179,7 +179,7 @@ Impara Altro Benvenuto to\nAmazon Posizione Dimostrazione Continua - © 2023, Amazon Web Servizi, Inc. o la sua affiliati. Tutti diritti riservato. + © 2024, Amazon Web Servizi, Inc. o la sua affiliati. Tutti diritti riservato. Di scaricamento, installazione, o utilizzando lo Amazon Posizione Dimostrazione App, voi concordare a lo App **Termini & Condizioni** per uso. Di scaricamento, installazione, o utilizzando lo Amazon Posizione Dimostrazione App, voi concordare a lo App **Termini & Condizioni** per uso. Termini & Condizioni diff --git a/app/src/main/res/values-iw/string.xml b/app/src/main/res/values-iw/string.xml index 3bbe7821..b11b9da7 100644 --- a/app/src/main/res/values-iw/string.xml +++ b/app/src/main/res/values-iw/string.xml @@ -179,7 +179,7 @@ ללמוד עוד ברוכים הבאים to\nAmazon מיקום הדגמה המשך - © 2023, Amazon אינטרנט שירותים, "בע""מ" או שלו שותפים. כל זכויות שמורה. + © 2024, Amazon אינטרנט שירותים, "בע""מ" או שלו שותפים. כל זכויות שמורה. על ידי הורדה, התקנה, או לנצל ה Amazon מיקום הדגמה אפליקציה, אתה מסכים כדי ה אפליקציות\ **תנאים & תנאים** בשביל להשתמש. על ידי הורדה, התקנה, או לנצל ה Amazon מיקום הדגמה אפליקציה, אתה מסכים כדי ה אפליקציות\ **תנאים & תנאים** בשביל להשתמש. תנאים & תנאים diff --git a/app/src/main/res/values-ja/string.xml b/app/src/main/res/values-ja/string.xml index f523237a..14baed55 100644 --- a/app/src/main/res/values-ja/string.xml +++ b/app/src/main/res/values-ja/string.xml @@ -179,7 +179,7 @@ 学ぶ もっと ウェルカム to\nAmazon ロケーション デモ 続行 - © 2023, Amazon ウェブ サービス、 インコーポレイテッド または その アフィリエイト。 [すべて] 権利 予約済み。 + © 2024, Amazon ウェブ サービス、 インコーポレイテッド または その アフィリエイト。 [すべて] 権利 予約済み。 によって ダウンロード中、 インストール、 または を使用します その Amazon ロケーション デモ アプリ、 あなた 同意する に その アプリ **規約 & 条件** にとって 使用。 によって ダウンロード中、 インストール、 または を使用します その Amazon ロケーション デモ アプリ、 あなた 同意する に その アプリ **規約 & 条件** にとって 使用。 規約 & 条件 diff --git a/app/src/main/res/values-ko/string.xml b/app/src/main/res/values-ko/string.xml index 6ce0f18f..03085210 100644 --- a/app/src/main/res/values-ko/string.xml +++ b/app/src/main/res/values-ko/string.xml @@ -179,7 +179,7 @@ 배우기 더 보기 어서 오십시오 to\nAmazon 위치 데모 계속 - © 2023, Amazon 웹 서비스, 주식회사 또는 그것의 계열사. 모두 권한 예약되어 있습니다. + © 2024, Amazon 웹 서비스, 주식회사 또는 그것의 계열사. 모두 권한 예약되어 있습니다. 에 의해 다운로드, 설치, 또는 를 사용하여 그 Amazon 위치 데모 앱, 당신 동의하다 에 그 앱\ \'의 **약관 & 조건** ...에 대한 용도. 에 의해 다운로드, 설치, 또는 를 사용하여 그 Amazon 위치 데모 앱, 당신 동의하다 에 그 앱\ \'의 **약관 & 조건** ...에 대한 용도. 약관 & 조건 diff --git a/app/src/main/res/values-pt/string.xml b/app/src/main/res/values-pt/string.xml index 5696702c..9755c6ef 100644 --- a/app/src/main/res/values-pt/string.xml +++ b/app/src/main/res/values-pt/string.xml @@ -179,7 +179,7 @@ Aprenda Mais Bem-vindo to\nAmazon Localização Demo Continuar - © 2023, Amazon Web Serviços, Inc. ou dela afiliados. Todos corretos reservado. + © 2024, Amazon Web Serviços, Inc. ou dela afiliados. Todos corretos reservado. Por baixando, instalando, ou usando a Amazon Localização Demo Aplicativo, você aceita para a Aplicativos **Termos & Condições** pelo usar. Por baixando, instalando, ou usando a Amazon Localização Demo Aplicativo, você aceita para a Aplicativos **Termos & Condições** pelo usar. Termos & Condições diff --git a/app/src/main/res/values-zh-rCN/string.xml b/app/src/main/res/values-zh-rCN/string.xml index d1790aae..1b229d63 100644 --- a/app/src/main/res/values-zh-rCN/string.xml +++ b/app/src/main/res/values-zh-rCN/string.xml @@ -179,7 +179,7 @@ 学习 更多 欢迎光临 to\nAmazon 地点 演示 继续 - © 2023年, Amazon 网页 服务, 公司 要么 它的 附属公司。 全部 权利 保留的。 + © 2024年, Amazon 网页 服务, 公司 要么 它的 附属公司。 全部 权利 保留的。 由 正在下载, 正在安装, 要么 使用 这 Amazon 地点 演示 应用程序, 你 同意 到 这 应用程序 **条款 & 条件** 为了 使用。 由 正在下载, 正在安装, 要么 使用 这 Amazon 地点 演示 应用程序, 你 同意 到 这 应用程序 **条款 & 条件** 为了 使用。 条款 & 条件 diff --git a/app/src/main/res/values-zh-rTW/string.xml b/app/src/main/res/values-zh-rTW/string.xml index 554ac7fc..08223b30 100644 --- a/app/src/main/res/values-zh-rTW/string.xml +++ b/app/src/main/res/values-zh-rTW/string.xml @@ -179,7 +179,7 @@ 學習 更多 歡迎 to\nAmazon 位置 演示 繼續 - © 2023, Amazon 網頁 服務, 公司 或者 它的 附屬機構。 所有 權利 保留。 + © 2024, Amazon 網頁 服務, 公司 或者 它的 附屬機構。 所有 權利 保留。 通過 下載, 安裝, 或者 運用 該 Amazon 位置 演示 應用程序, 您 同意 至 該 應用\ 的 ** 條款 & 條件 ** 為了 使用。 通過 下載, 安裝, 或者 運用 該 Amazon 位置 演示 應用程序, 您 同意 至 該 應用\ 的 ** 條款 & 條件 ** 為了 使用。 條款 & 條件 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 731a683f..b6fdacbd 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -196,7 +196,7 @@ Learn More Welcome to\nAmazon Location Demo Continue - © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. + © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. By downloading, installing, or using the Amazon Location Demo App, you agree to the App\'s **Terms & Conditions** for use. By downloading, installing, or using the Amazon Location Demo App, you agree to the App\'s **Terms & Conditions** for use. Terms & Conditions