@@ -10,7 +10,6 @@ import io.ktor.client.*
1010import io.ktor.client.call.*
1111import io.ktor.client.plugins.contentnegotiation.*
1212import io.ktor.client.request.*
13- import io.ktor.client.statement.*
1413import io.ktor.http.*
1514import io.ktor.serialization.jackson.*
1615import io.ktor.server.engine.*
@@ -26,8 +25,8 @@ class HttpProtocolServerTest {
2625 private val mockServer: EmbeddedServer <* , * > = mockk()
2726 private val exposedThing: ExposedThing = ExposedThing (
2827 thing(" test" ) {
29- property (" property1" ){
30- type = " integer "
28+ intProperty (" property1" ){
29+ title = " title "
3130 }
3231 action(" action1" ){
3332
@@ -121,10 +120,10 @@ class HttpProtocolServerTest {
121120 // Perform GET request on "/"
122121 val response = client.get(" /" )
123122
124- println (response.bodyAsText())
125-
126123 val things : List <ExposedThing > = response.body()
127124
125+ assertEquals(1 , things.size)
126+
128127 assertEquals(HttpStatusCode .OK , response.status)
129128 assertContains(things, exposedThing)
130129 }
@@ -141,8 +140,6 @@ class HttpProtocolServerTest {
141140 // Perform GET request on "/test"
142141 val response = client.get(" /${exposedThing.id} " )
143142
144- println (response.bodyAsText())
145-
146143 val thing : ExposedThing = response.body()
147144
148145 assertEquals(HttpStatusCode .OK , response.status)
@@ -181,6 +178,7 @@ class HttpProtocolServerTest {
181178 }
182179
183180 assertEquals(HttpStatusCode .OK , response.status)
181+
184182 }
185183
186184 private fun ApplicationTestBuilder.httpClient (): HttpClient {
0 commit comments