You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: courier-message-adapter-moshi/src/test/java/com/gojek/courier/messageadapter/moshi/MoshiMessageAdapterTest.kt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ class MoshiMessageAdapterTest {
27
27
val testClass =TestClass(100, "test100")
28
28
val testString ="""{"id":100,"name":"test100"}"""
29
29
30
-
val message = moshiMessageAdapter.toMessage(testClass)
30
+
val message = moshiMessageAdapter.toMessage(topic ="any", data =testClass)
Copy file name to clipboardExpand all lines: courier-message-adapter-protobuf/src/test/java/com/gojek/courier/messageadapter/protobuf/ProtobufMessageAdapterTest.kt
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ class ProtobufMessageAdapterTest {
19
19
funserialise() {
20
20
val user =User.newBuilder().setId(123).setName("Test").build()
21
21
val encodedString ="CgRUZXN0EHs="
22
-
val userMessage = protobufMessageAdapter.toMessage(user)
22
+
val userMessage = protobufMessageAdapter.toMessage(topic ="any", data =user)
23
23
val userString =String(Base64.getEncoder().encode((userMessage asMessage.Bytes).value))
24
24
assertEquals(userString, encodedString)
25
25
}
@@ -28,14 +28,20 @@ class ProtobufMessageAdapterTest {
28
28
fundeserialise() {
29
29
val encodedString ="CgRUZXN0EHs="
30
30
val byteArray =Base64.getDecoder().decode(encodedString)
31
-
val user = protobufMessageAdapter.fromMessage(Message.Bytes(byteArray))
0 commit comments