Recover test for mutable List variable and move it to ListSpecificTests

This commit is contained in:
Ilya Ryzhenkov
2014-06-09 23:55:53 +04:00
parent ce5f7e9d61
commit 3491c88793
2 changed files with 56 additions and 80 deletions
@@ -40,4 +40,17 @@ class ListSpecificTest {
assertEquals("bar", data.last)
assertEquals(1, data.lastIndex)
}
Test fun mutableList() {
val map = mapOf("beverage" to "beer", "location" to "Mells", "name" to "James")
var list = arrayListOf<String>()
for (e in map) {
list += e.getKey()
list += e.getValue()
}
assertEquals(6, list.size())
assertEquals("beverage,beer,location,Mells,name,James", list.makeString(","))
}
}