aboutsummaryrefslogtreecommitdiff
path: root/java/android/OlmLibSdk/olm-sdk/src/androidTest
diff options
context:
space:
mode:
authorylecollen <ylecollen@amdocs.com>2017-01-03 16:41:04 +0100
committerylecollen <ylecollen@amdocs.com>2017-01-03 16:41:04 +0100
commit45a98c20a8f0018c80b18e6bb6e04b3a6be03732 (patch)
tree97f21c3d24c7476b9ceff047de3e6b1e84f53d62 /java/android/OlmLibSdk/olm-sdk/src/androidTest
parent9552e14fdadd9fadbe88970cfb8df7b697c0deb4 (diff)
EncryptMessage triggers an exception when it 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.java6
1 files changed, 5 insertions, 1 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 111032e..0f0d779 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
@@ -113,7 +113,11 @@ public class OlmGroupSessionTest {
@Test
public void test05OutboundGroupEncryptMessage() {
// alice encrypts a message to bob
- mAliceToBobMessage = mAliceOutboundGroupSession.encryptMessage(CLEAR_MESSAGE1);
+ try {
+ mAliceToBobMessage = mAliceOutboundGroupSession.encryptMessage(CLEAR_MESSAGE1);
+ } catch (OlmOutboundGroupSession.EncryptMessageException e) {
+ assertTrue("Exception in bob encryptMessage, Exception code=" + e.getMessage(), false);
+ }
assertFalse(TextUtils.isEmpty(mAliceToBobMessage));
// test message index after encryption is incremented