-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated RecordEncoderGenerator for function returns
- Loading branch information
Showing
4 changed files
with
89 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
centurion-avro/src/test/kotlin/com/sksamuel/centurion/avro/encoders/ArrayEncoderTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.sksamuel.centurion.avro.encoders | ||
|
||
import io.kotest.core.spec.style.FunSpec | ||
import io.kotest.matchers.shouldBe | ||
import org.apache.avro.Schema | ||
import org.apache.avro.util.Utf8 | ||
|
||
class ArrayEncoderTest : FunSpec({ | ||
|
||
test("encoding list of strings") { | ||
val schema = Schema.createArray(Schema.create(Schema.Type.STRING)) | ||
ArrayEncoder(StringEncoder).encode(schema).invoke(arrayOf("foo", "bar")) shouldBe listOf(Utf8("foo"), Utf8("bar")) | ||
} | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters