mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	MediaDetailFragmentUnitTests.kt: modified property names to camel case to meet ktlint standard
This commit is contained in:
		
							parent
							
								
									b6c943edc6
								
							
						
					
					
						commit
						88d853e3fa
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		|  | @ -76,8 +76,8 @@ import java.util.Locale | ||||||
| @Config(sdk = [21], application = TestCommonsApplication::class) | @Config(sdk = [21], application = TestCommonsApplication::class) | ||||||
| @LooperMode(LooperMode.Mode.PAUSED) | @LooperMode(LooperMode.Mode.PAUSED) | ||||||
| class MediaDetailFragmentUnitTests { | class MediaDetailFragmentUnitTests { | ||||||
|     private val REQUEST_CODE = 1001 |     private val requestCode = 1001 | ||||||
|     private val LAST_LOCATION = "last_location_while_uploading" |     private val lastLocation = "last_location_while_uploading" | ||||||
|     private lateinit var fragment: MediaDetailFragment |     private lateinit var fragment: MediaDetailFragment | ||||||
|     private lateinit var fragmentManager: FragmentManager |     private lateinit var fragmentManager: FragmentManager | ||||||
|     private lateinit var layoutInflater: LayoutInflater |     private lateinit var layoutInflater: LayoutInflater | ||||||
|  | @ -234,19 +234,19 @@ class MediaDetailFragmentUnitTests { | ||||||
|     @Test |     @Test | ||||||
|     @Throws(Exception::class) |     @Throws(Exception::class) | ||||||
|     fun testOnActivityResultLocationPickerActivity() { |     fun testOnActivityResultLocationPickerActivity() { | ||||||
|         fragment.onActivityResult(REQUEST_CODE, Activity.RESULT_CANCELED, intent) |         fragment.onActivityResult(requestCode, Activity.RESULT_CANCELED, intent) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Test |     @Test | ||||||
|     @Throws(Exception::class) |     @Throws(Exception::class) | ||||||
|     fun `test OnActivity Result Cancelled LocationPickerActivity`() { |     fun `test OnActivity Result Cancelled LocationPickerActivity`() { | ||||||
|         fragment.onActivityResult(REQUEST_CODE, Activity.RESULT_CANCELED, intent) |         fragment.onActivityResult(requestCode, Activity.RESULT_CANCELED, intent) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Test |     @Test | ||||||
|     @Throws(Exception::class) |     @Throws(Exception::class) | ||||||
|     fun `test OnActivity Result Cancelled DescriptionEditActivity`() { |     fun `test OnActivity Result Cancelled DescriptionEditActivity`() { | ||||||
|         fragment.onActivityResult(REQUEST_CODE, Activity.RESULT_OK, intent) |         fragment.onActivityResult(requestCode, Activity.RESULT_OK, intent) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     @Test |     @Test | ||||||
|  | @ -267,7 +267,7 @@ class MediaDetailFragmentUnitTests { | ||||||
|     fun testOnUpdateCoordinatesClickedCurrentLocationNull() { |     fun testOnUpdateCoordinatesClickedCurrentLocationNull() { | ||||||
|         `when`(media.coordinates).thenReturn(null) |         `when`(media.coordinates).thenReturn(null) | ||||||
|         `when`(locationManager.lastLocation).thenReturn(null) |         `when`(locationManager.lastLocation).thenReturn(null) | ||||||
|         `when`(applicationKvStore.getString(LAST_LOCATION)).thenReturn("37.773972,-122.431297") |         `when`(applicationKvStore.getString(lastLocation)).thenReturn("37.773972,-122.431297") | ||||||
|         fragment.onUpdateCoordinatesClicked() |         fragment.onUpdateCoordinatesClicked() | ||||||
|         Mockito.verify(media, Mockito.times(1)).coordinates |         Mockito.verify(media, Mockito.times(1)).coordinates | ||||||
|         Mockito.verify(locationManager, Mockito.times(1)).lastLocation |         Mockito.verify(locationManager, Mockito.times(1)).lastLocation | ||||||
|  | @ -281,7 +281,7 @@ class MediaDetailFragmentUnitTests { | ||||||
|     @Throws(Exception::class) |     @Throws(Exception::class) | ||||||
|     fun testOnUpdateCoordinatesClickedNotNullValue() { |     fun testOnUpdateCoordinatesClickedNotNullValue() { | ||||||
|         `when`(media.coordinates).thenReturn(LatLng(-0.000001, -0.999999, 0f)) |         `when`(media.coordinates).thenReturn(LatLng(-0.000001, -0.999999, 0f)) | ||||||
|         `when`(applicationKvStore.getString(LAST_LOCATION)).thenReturn("37.773972,-122.431297") |         `when`(applicationKvStore.getString(lastLocation)).thenReturn("37.773972,-122.431297") | ||||||
|         fragment.onUpdateCoordinatesClicked() |         fragment.onUpdateCoordinatesClicked() | ||||||
|         Mockito.verify(media, Mockito.times(3)).coordinates |         Mockito.verify(media, Mockito.times(3)).coordinates | ||||||
|         val shadowActivity: ShadowActivity = shadowOf(activity) |         val shadowActivity: ShadowActivity = shadowOf(activity) | ||||||
|  | @ -295,7 +295,7 @@ class MediaDetailFragmentUnitTests { | ||||||
|     fun testOnUpdateCoordinatesClickedCurrentLocationNotNull() { |     fun testOnUpdateCoordinatesClickedCurrentLocationNotNull() { | ||||||
|         `when`(media.coordinates).thenReturn(null) |         `when`(media.coordinates).thenReturn(null) | ||||||
|         `when`(locationManager.lastLocation).thenReturn(LatLng(-0.000001, -0.999999, 0f)) |         `when`(locationManager.lastLocation).thenReturn(LatLng(-0.000001, -0.999999, 0f)) | ||||||
|         `when`(applicationKvStore.getString(LAST_LOCATION)).thenReturn("37.773972,-122.431297") |         `when`(applicationKvStore.getString(lastLocation)).thenReturn("37.773972,-122.431297") | ||||||
| 
 | 
 | ||||||
|         fragment.onUpdateCoordinatesClicked() |         fragment.onUpdateCoordinatesClicked() | ||||||
|         Mockito.verify(locationManager, Mockito.times(3)).lastLocation |         Mockito.verify(locationManager, Mockito.times(3)).lastLocation | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tristan81
						tristan81