File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/test/kotlin/io/github/nstdio/http/ext Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ package io.github.nstdio.http.ext
1717
1818import io.github.nstdio.http.ext.Assertions.assertThat
1919import io.kotest.matchers.maps.shouldBeEmpty
20+ import io.kotest.matchers.should
21+ import io.kotest.matchers.string.shouldEndWith
22+ import io.kotest.matchers.string.shouldStartWith
2023import io.kotest.matchers.types.shouldBeSameInstanceAs
2124import org.junit.jupiter.api.BeforeEach
2225import org.junit.jupiter.api.Test
@@ -139,4 +142,18 @@ internal class HttpHeadersBuilderTest {
139142 h1 shouldBeSameInstanceAs h2
140143 h1.map().shouldBeEmpty()
141144 }
145+
146+ @Test
147+ fun `Should have proper toString` () {
148+ // when
149+ builder
150+ .add(" b" , listOf (" 3" , " 4" ))
151+ .add(" a" , listOf (" 1" , " 2" ))
152+
153+ // then
154+ builder.toString().should {
155+ it shouldStartWith " ${HttpHeadersBuilder ::class .qualifiedName} @"
156+ it shouldEndWith " { {a=[1, 2], b=[3, 4]} }"
157+ }
158+ }
142159}
You can’t perform that action at this time.
0 commit comments