Added more app tests

This commit is contained in:
Erik C. Thauvin 2023-06-07 11:50:45 -07:00
parent 6f1e6fd203
commit 221156e1fd
2 changed files with 20 additions and 3 deletions

View file

@ -42,6 +42,23 @@ class UrlEncoderTest {
)
}
@Test
fun `Encode no options`() {
for (m in validMap) {
assertEquals(m.second, UrlEncoder.encode(m.first), "encode(${m.first})")
}
}
@Test
fun `Encode with SpaceToPlus`() {
assertEquals("this+is+a+test", UrlEncoder.encode("this is a test", spaceToPlus = true))
}
@Test
fun `Encode with allow`() {
assertEquals("this is a test", UrlEncoder.encode("this is a test", allow = " "))
}
@Test
fun `Main Decode`() {
for (m in validMap) {
@ -96,7 +113,8 @@ class UrlEncoderTest {
val result = processMain(arrayOf(arg))
assertEquals(usage, result.output, "processMain('$arg')")
assertEquals(1, result.status, "processMain('$arg').status")
}}
}
}
@Test
fun `Main Usage with too Many Args`() {