public class JsonExpectationsHelper extends ObjectSE
このクラスを使用するには、JSONassert ライブラリが必要です。
コンストラクターと説明 |
---|
JsonExpectationsHelper() |
修飾子と型 | メソッドと説明 |
---|---|
void | assertJsonEqual(StringSE expected, StringSE actual) 期待される文字列と実際の文字列を JSON として解析し、2 つが「類似している」ことを表明します。 |
void | assertJsonEqual(StringSE expected, StringSE actual, boolean strict) 期待される文字列と実際の文字列を JSON として解析し、2 つが「類似している」ことを表明します。 |
void | assertJsonNotEqual(StringSE expected, StringSE actual) 期待される文字列と実際の文字列を JSON として解析し、2 つが「類似していない」ことを表明します。 |
void | assertJsonNotEqual(StringSE expected, StringSE actual, boolean strict) 期待される文字列と実際の文字列を JSON として解析し、2 つが「類似していない」ことを表明します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void assertJsonEqual(StringSE expected, StringSE actual) throws ExceptionSE
expected
- 予期される JSON コンテンツ actual
- 実際の JSON コンテンツ ExceptionSE
assertJsonEqual(String, String, boolean)
public void assertJsonEqual(StringSE expected, StringSE actual, boolean strict) throws ExceptionSE
strict
パラメーター値に応じて、2 つのモードで比較できます。
true
: 厳格なチェック。拡張可能ではなく、厳密な配列順序。false
: 寛大なチェック。拡張可能な、厳密でない配列の順序。expected
- 予期される JSON コンテンツ actual
- 実際の JSON コンテンツ strict
- 厳密なチェックを可能にします ExceptionSE
public void assertJsonNotEqual(StringSE expected, StringSE actual) throws ExceptionSE
expected
- 予期される JSON コンテンツ actual
- 実際の JSON コンテンツ ExceptionSE
assertJsonNotEqual(String, String, boolean)
public void assertJsonNotEqual(StringSE expected, StringSE actual, boolean strict) throws ExceptionSE
strict
パラメーター値に応じて、2 つのモードで比較できます。
true
: 厳格なチェック。拡張可能ではなく、厳密な配列順序。false
: 寛大なチェック。拡張可能な、厳密でない配列の順序。expected
- 予期される JSON コンテンツ actual
- 実際の JSON コンテンツ strict
- 厳密なチェックを可能にします ExceptionSE