This pull request adds comprehensive unit tests for the LocationUtils class in the EarthquakeSurvival app. The tests cover all the public methods in LocationUtils.java to ensure their correct behavior.
Description
The changes in this pull request include:
Creating a new test file app/src/test/java/com/adkdevelopment/earthquakesurvival/utils/LocationUtilsTest.java to implement the unit tests.
Implementing test methods for each public method in LocationUtils.java, including:
testGetErrorString
testGetTransitionString
testGetTransitionDetails
testGetLocation
testSetLocation
testSetLocationWithNullLocation
testGetDistance
testGetDistanceWithZeroLatitude
Using Mockito to mock Android-specific classes like Context, SharedPreferences, and Geofence to allow for isolated testing of the utility methods.
Summary
The key changes in this pull request are:
app/src/test/java/com/adkdevelopment/earthquakesurvival/utils/LocationUtilsTest.java: New file containing comprehensive unit tests for LocationUtils.java.
Implemented test methods covering all public methods in LocationUtils.java.
Used Mockito to mock Android-specific classes for isolated testing.
Purpose
This pull request adds comprehensive unit tests for the
LocationUtils
class in theEarthquakeSurvival
app. The tests cover all the public methods inLocationUtils.java
to ensure their correct behavior.Description
The changes in this pull request include:
app/src/test/java/com/adkdevelopment/earthquakesurvival/utils/LocationUtilsTest.java
to implement the unit tests.LocationUtils.java
, including:testGetErrorString
testGetTransitionString
testGetTransitionDetails
testGetLocation
testSetLocation
testSetLocationWithNullLocation
testGetDistance
testGetDistanceWithZeroLatitude
Context
,SharedPreferences
, andGeofence
to allow for isolated testing of the utility methods.Summary
The key changes in this pull request are:
app/src/test/java/com/adkdevelopment/earthquakesurvival/utils/LocationUtilsTest.java
: New file containing comprehensive unit tests forLocationUtils.java
.LocationUtils.java
.Fixes
66. Continue the conversation here: http://localhost:3000/c/5a7192a6-a7a1-4502-b55e-d8c4ae602ed3.
To have Sweep make further changes, please add a comment to this PR starting with "Sweep:".
:book: For more information on how to use Sweep, please read our documentation.