@@ -84,13 +84,13 @@ class StdioTransportTest {
8484 @Test
8585 fun `should read JSON-RPC request from input` (): Unit = runBlocking {
8686 val testMethod = MethodName (" test.method" )
87- transport.send(JsonRpcRequest (RequestId (" 1 " ), testMethod, JsonPrimitive (" value" )))
87+ transport.send(JsonRpcRequest (RequestId (1 ), testMethod, JsonPrimitive (" value" )))
8888
8989 // Read the message from the transport
9090 val message = messages.receive()
9191
9292 assertTrue(message is JsonRpcRequest )
93- assertEquals(RequestId (" 1 " ), message.id)
93+ assertEquals(RequestId (1 ), message.id)
9494 assertEquals(testMethod, message.method)
9595 assertNotNull(message.params)
9696 }
@@ -109,13 +109,13 @@ class StdioTransportTest {
109109
110110 @Test
111111 fun `should read JSON-RPC response from input` (): Unit = runBlocking {
112- transport.send(JsonRpcResponse (RequestId (" 42 " ), result = JsonPrimitive (" success" )))
112+ transport.send(JsonRpcResponse (RequestId (42 ), result = JsonPrimitive (" success" )))
113113
114114 // Read the message from the transport
115115 val message = messages.receive()
116116
117117 assertTrue(message is JsonRpcResponse )
118- assertEquals(RequestId (" 42 " ), message.id)
118+ assertEquals(RequestId (42 ), message.id)
119119 assertEquals(JsonPrimitive (" success" ), message.result)
120120 }
121121
@@ -124,9 +124,9 @@ class StdioTransportTest {
124124 val method1 = MethodName (" method1" )
125125 val notification1 = MethodName (" notification1" )
126126
127- transport.send(JsonRpcRequest (RequestId (" 1 " ), method1))
127+ transport.send(JsonRpcRequest (RequestId (1 ), method1))
128128 transport.send(JsonRpcNotification (method = notification1))
129- transport.send(JsonRpcResponse (RequestId (" 2 " ), result = JsonPrimitive (" ok" )))
129+ transport.send(JsonRpcResponse (RequestId (2 ), result = JsonPrimitive (" ok" )))
130130
131131 val message1 = messages.receive()
132132 val message2 = messages.receive()
@@ -139,16 +139,16 @@ class StdioTransportTest {
139139 assertEquals(notification1, message2.method)
140140
141141 assertTrue(message3 is JsonRpcResponse )
142- assertEquals(RequestId (" 2 " ), message3.id)
142+ assertEquals(RequestId (2 ), message3.id)
143143 }
144144
145145 @Test
146146 fun `should skip invalid JSON lines and continue processing` (): Unit = runBlocking {
147147 val firstMethod = MethodName (" first" )
148148 val secondMethod = MethodName (" second" )
149149
150- transport.send(JsonRpcRequest (RequestId (" 1 " ), firstMethod))
151- transport.send(JsonRpcRequest (RequestId (" 2 " ), secondMethod))
150+ transport.send(JsonRpcRequest (RequestId (1 ), firstMethod))
151+ transport.send(JsonRpcRequest (RequestId (2 ), secondMethod))
152152
153153 val message1 = messages.receive()
154154 assertTrue(message1 is JsonRpcRequest )
@@ -209,7 +209,7 @@ class StdioTransportTest {
209209 launch {
210210 var i = 0
211211 while (transport.state.value != Transport .State .CLOSED ) {
212- transport.send(JsonRpcRequest (RequestId (" ${ i++ } " ), testMethod))
212+ transport.send(JsonRpcRequest (RequestId (i++ ), testMethod))
213213 delay(10 .milliseconds)
214214 }
215215 }
@@ -221,7 +221,7 @@ class StdioTransportTest {
221221 @Test
222222 fun `should handle end of stream gracefully` (): Unit = runBlocking {
223223 val testMethod = MethodName (" test" )
224- transport.send(JsonRpcRequest (RequestId (" 1 " ), testMethod))
224+ transport.send(JsonRpcRequest (RequestId (1 ), testMethod))
225225
226226 val message = messages.receive()
227227 assertTrue(message is JsonRpcRequest )
0 commit comments