mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Refactor Nearby Location Tests to Improve Assertion Logic
-Refactored testSearchCloseToCurrentLocationWhenFar: Simplified assertion by using assertFalse(!isClose) for better readability and logical clarity. -Added testSearchCloseToCurrentLocationWhenClose: Created a new test case to validate behavior when the search is close to the current location, ensuring assertTrue(isClose) for correctness. -Improved Coverage: These changes enhance the test coverage and reliability of the searchCloseToCurrentLocation function.
This commit is contained in:
		
							parent
							
								
									038ae9acd4
								
							
						
					
					
						commit
						b0ee65ea58
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -306,7 +306,7 @@ class NearbyParentFragmentPresenterTest { | |||
|         // 111.19 km real distance, return false if 148306.444306 >  currentLocationSearchRadius | ||||
|         NearbyController.currentLocationSearchRadius = 148306.0 | ||||
|         val isClose = nearbyPresenter.searchCloseToCurrentLocation() | ||||
|         assertFalse(isClose!!.equals(false)) | ||||
|         assertFalse(!isClose) | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | @ -318,7 +318,7 @@ class NearbyParentFragmentPresenterTest { | |||
|         // 111.19 km real distance, return false if 148253.333 >  currentLocationSearchRadius | ||||
|         NearbyController.currentLocationSearchRadius = 148307.0 | ||||
|         val isClose = nearbyPresenter.searchCloseToCurrentLocation() | ||||
|         assertTrue(isClose!!) | ||||
|         assertTrue(isClose) | ||||
|     } | ||||
| 
 | ||||
|     fun expectMapAndListUpdate() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Akshay Komar
						Akshay Komar