20 lines
946 B
Kotlin
20 lines
946 B
Kotlin
package utils
|
|
|
|
import org.skyscreamer.jsonassert.JSONAssert
|
|
|
|
infix fun String?.shouldBeEqualToJson(expected: String?) = JSONAssert.assertEquals(expected, this, false)
|
|
|
|
infix fun String?.`should be equal to json`(expected: String?) = shouldBeEqualToJson(expected)
|
|
|
|
infix fun String?.shouldStrictlyBeEqualToJson(expected: String?) = JSONAssert.assertEquals(expected, this, true)
|
|
|
|
infix fun String?.`should strictly be equal to json`(expected: String?) = shouldStrictlyBeEqualToJson(expected)
|
|
|
|
infix fun String?.shouldNotStrictlyBeEqualToJson(expected: String?) = JSONAssert.assertNotEquals(expected, this, true)
|
|
|
|
infix fun String?.`should not strictly be equal to json`(expected: String?) = shouldNotStrictlyBeEqualToJson(expected)
|
|
|
|
infix fun String?.shouldNotBeEqualToJson(expected: String?) = JSONAssert.assertNotEquals(expected, this, false)
|
|
|
|
infix fun String?.`should not be equal to json`(expected: String?) = shouldNotBeEqualToJson(expected)
|