diff options
author | pedroGitt <pedro.contreiras@amdocs.com> | 2016-10-21 19:05:20 +0200 |
---|---|---|
committer | pedroGitt <pedro.contreiras@amdocs.com> | 2016-10-21 19:05:20 +0200 |
commit | fae857582c445ce89f527f6331aeac4eb66bc692 (patch) | |
tree | 23170c1f77bad61e317503587af7b9881d63c539 /java/android/OlmLibSdk/olm-sdk/src/androidTest | |
parent | 71f57b79e57ca668c4621e1cecf5742f428c5cde (diff) |
Add serialization for outbound group session
Diffstat (limited to 'java/android/OlmLibSdk/olm-sdk/src/androidTest')
-rw-r--r-- | java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java index e488ae0..d49ebd4 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java +++ b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java @@ -183,16 +183,27 @@ public class OlmGroupSessionTest { outboundGroupSessionSerial = (OlmOutboundGroupSession) objectInput.readObject(); objectInput.close(); - // get sessions IDs + // get sessions keys String sessionKeyRef = outboundGroupSessionRef.sessionKey(); String sessionKeySerial = outboundGroupSessionSerial.sessionKey(); - // session ID sanity check + // session keys sanity check assertFalse(TextUtils.isEmpty(sessionKeyRef)); assertFalse(TextUtils.isEmpty(sessionKeySerial)); - // session IDs comparison + // session keys comparison assertTrue(sessionKeyRef.equals(sessionKeySerial)); + + // get sessions IDs + String sessionIdRef = outboundGroupSessionRef.sessionIdentifier(); + String sessionIdSerial = outboundGroupSessionSerial.sessionIdentifier(); + + // session ID sanity check + assertFalse(TextUtils.isEmpty(sessionIdRef)); + assertFalse(TextUtils.isEmpty(sessionIdSerial)); + + // session IDs comparison + assertTrue(sessionIdRef.equals(sessionIdSerial)); } catch (FileNotFoundException e) { Log.e(LOG_TAG, "## test03SessionSerialization(): Exception FileNotFoundException Msg=="+e.getMessage()); |