aboutsummaryrefslogtreecommitdiff
path: root/java/android/OlmLibSdk/olm-sdk/src/androidTest
diff options
context:
space:
mode:
authorylecollen <ylecollen@amdocs.com>2017-01-04 12:35:15 +0100
committerylecollen <ylecollen@amdocs.com>2017-01-04 12:35:15 +0100
commit261c08086c0a6dc6c9f9400017a1c1a03cbece23 (patch)
tree2974eb80a7efbf882a96685248ab48d0199727a4 /java/android/OlmLibSdk/olm-sdk/src/androidTest
parent88548f687e7f6f51a48ac9cf3a342354731ad694 (diff)
the OlmInboundGroupSession methods trigger an exception when they fails
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.java10
1 files changed, 8 insertions, 2 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 0f0d779..9526410 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
@@ -138,7 +138,13 @@ public class OlmGroupSessionTest {
@Test
public void test08GetInboundGroupSessionIdentifier() {
// check both session identifiers are equals
- mBobSessionIdentifier = mBobInboundGroupSession.sessionIdentifier();
+ mBobSessionIdentifier = null;
+
+ try {
+ mBobSessionIdentifier = mBobInboundGroupSession.sessionIdentifier();
+ } catch (Exception e) {
+ assertTrue(e.getMessage(), false);
+ }
assertFalse(TextUtils.isEmpty(mBobSessionIdentifier));
}
@@ -479,7 +485,7 @@ public class OlmGroupSessionTest {
String exceptionMessage = null;
try {
bobInboundGroupSession.decryptMessage(corruptedEncryptedMsg);
- } catch (OlmInboundGroupSession.DecryptMessageException e) {
+ } catch (OlmException e) {
exceptionMessage = e.getMessage();
}