mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Updated instances of assert() in LabelTest.kt to asserThat().
New imports: - org.hamcrest.CoreMatchers.equalTo - org.hamcrest.CoreMatchers.assertThat
This commit is contained in:
		
							parent
							
								
									336ee946c2
								
							
						
					
					
						commit
						33af7d0d63
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -3,6 +3,8 @@ package fr.free.nrw.commons.nearby | |||
| import fr.free.nrw.commons.R | ||||
| import org.junit.Before | ||||
| import org.junit.Test | ||||
| import org.hamcrest.MatcherAssert.assertThat | ||||
| import org.hamcrest.CoreMatchers.equalTo | ||||
| 
 | ||||
| class LabelTest { | ||||
|     private lateinit var label: Label | ||||
|  | @ -21,7 +23,7 @@ class LabelTest { | |||
|      */ | ||||
|     @Test | ||||
|     fun testLabelIcon() { | ||||
|         assert(label.icon.equals(R.drawable.round_icon_church)) | ||||
|         assertThat(label.icon, equalTo(R.drawable.round_icon_church)) | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | @ -30,6 +32,6 @@ class LabelTest { | |||
|     @Test | ||||
|     fun testNullLabelIcon() { | ||||
|         var nullLabel: Label = Label.fromText("a random text not exist in label texts") | ||||
|         assert(nullLabel.icon.equals(R.drawable.round_icon_unknown)) | ||||
|         assertThat(nullLabel.icon, equalTo(R.drawable.round_icon_unknown)) | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 u7683345
						u7683345