All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonTest.io.kotest.assertions.json.EmptyJsonTests.kt Maven / Gradle / Ivy

package io.kotest.assertions.json

import io.kotest.assertions.json.shouldBeEmptyJsonArray
import io.kotest.assertions.json.shouldBeEmptyJsonObject
import io.kotest.core.spec.style.FunSpec

class EmptyJsonTests : FunSpec() {
   init {
      test("should match empty array") {
         "[]".shouldBeEmptyJsonArray()
         "   [  ]  ".shouldBeEmptyJsonArray()
         "[\n] ".shouldBeEmptyJsonArray()
      }
      test("should match empty object") {
         "{}".shouldBeEmptyJsonObject()
         "    {    } ".shouldBeEmptyJsonObject()
         "  {\n\n } ".shouldBeEmptyJsonObject()
      }
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy