Skip to content

Commit

Permalink
feat: specify json language hint as input
Browse files Browse the repository at this point in the history
  • Loading branch information
celcius112 committed Oct 18, 2023
1 parent ec61ccc commit 93a95ec
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.ekino.oss.jcv.db.util.JsonConverter.formatInput
import org.assertj.core.api.AbstractAssert
import org.assertj.db.type.Source
import org.assertj.db.type.Table
import org.intellij.lang.annotations.Language
import org.json.JSONArray
import org.json.JSONException
import org.skyscreamer.jsonassert.JSONCompareMode
Expand Down Expand Up @@ -64,7 +65,7 @@ class DbComparatorAssertJ(
mapper
)

fun isValidAgainst(input: String) = formatInput(input)?.let { compareActualAndExcepted(it) } ?: throw DbAssertException(
fun isValidAgainst(@Language("JSON") input: String) = formatInput(input)?.let { compareActualAndExcepted(it) } ?: throw DbAssertException(
"Unable to parse expected result from string to json"
)

Expand Down

0 comments on commit 93a95ec

Please sign in to comment.