Skip to content

Instantly share code, notes, and snippets.

@abdurahmanadilovic
Created January 28, 2018 11:39
Show Gist options
  • Save abdurahmanadilovic/b180f506d9851486cba288cfdffea5e7 to your computer and use it in GitHub Desktop.
Save abdurahmanadilovic/b180f506d9851486cba288cfdffea5e7 to your computer and use it in GitHub Desktop.
import org.junit.Test
import org.junit.Assert.*
class KotlinStandardLibraryTests{
@Test
fun testFilterExtensionFunction(){
val listOfLinks = listOf(
"www.codingstoic.com",
"www.codingblast.com",
"www.kotlinlang.org",
"www.android.com"
)
val dotComLinks = listOfLinks.filter { it.contains(".com") }
assertEquals(3, dotComLinks.size)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment