Light refactoring by using test helper methods getFingerprintKey() and getIdentityKey()
This commit is contained in:
parent
c144d3fec5
commit
1fd908c72a
1 changed files with 4 additions and 16 deletions
|
@ -132,24 +132,12 @@ public class OlmAccountTest {
|
||||||
Log.d(LOG_TAG,"## testIdentityKeys Keys="+identityKeysJson);
|
Log.d(LOG_TAG,"## testIdentityKeys Keys="+identityKeysJson);
|
||||||
|
|
||||||
// is JSON_KEY_FINGER_PRINT_KEY present?
|
// is JSON_KEY_FINGER_PRINT_KEY present?
|
||||||
try {
|
String fingerPrintKey = TestHelper.getFingerprintKey(identityKeysJson);
|
||||||
String fingerPrintKey = identityKeysJson.getString(OlmAccount.JSON_KEY_FINGER_PRINT_KEY);
|
|
||||||
assertTrue("fingerprint key missing",!TextUtils.isEmpty(fingerPrintKey));
|
assertTrue("fingerprint key missing",!TextUtils.isEmpty(fingerPrintKey));
|
||||||
} catch (JSONException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
assertTrue("Exception MSg="+e.getMessage(), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// is JSON_KEY_IDENTITY_KEY present?
|
// is JSON_KEY_IDENTITY_KEY present?
|
||||||
try {
|
String identityKey = TestHelper.getIdentityKey(identityKeysJson);
|
||||||
String identityKey = identityKeysJson.getString(OlmAccount.JSON_KEY_IDENTITY_KEY);
|
|
||||||
assertTrue("identity key missing",!TextUtils.isEmpty(identityKey));
|
assertTrue("identity key missing",!TextUtils.isEmpty(identityKey));
|
||||||
} catch (JSONException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
assertTrue("Exception MSg="+e.getMessage(), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//****************************************************
|
//****************************************************
|
||||||
|
|
Loading…
Reference in a new issue