Created
January 28, 2018 11:39
-
-
Save abdurahmanadilovic/b180f506d9851486cba288cfdffea5e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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