Skip to content

Commit

Permalink
Added test for CachedReflectionSerdeFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed May 5, 2024
1 parent 8203132 commit 9ca4ed4
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.sksamuel.centurion.avro.io

import com.sksamuel.centurion.avro.encoders.User
import io.kotest.core.spec.style.FunSpec
import io.kotest.matchers.types.shouldBeSameInstanceAs

class CachedReflectionSerdeFactoryTest : FunSpec({

test("should cache instances") {
val serde1 = CachedReflectionSerdeFactory.create<User>()
val serde2 = CachedReflectionSerdeFactory.create<User>()
serde1.shouldBeSameInstanceAs(serde2)
}

})

0 comments on commit 9ca4ed4

Please sign in to comment.