moved the Map<String,String>.toProperties() helper function into the standard library and added a test case

This commit is contained in:
James Strachan
2012-08-02 11:57:12 +01:00
parent 94cdbb0f08
commit 137eee3f45
3 changed files with 22 additions and 10 deletions
+8
View File
@@ -187,4 +187,12 @@ class MapTest {
}
*/
test fun toProperties() {
val map = hashMap("a" to "A", "b" to "B")
val prop = map.toProperties()
assertEquals(2, prop.size)
assertEquals("A", prop.getProperty("a", "fail"))
assertEquals("B", prop.getProperty("b", "fail"))
}
}