aboutsummaryrefslogtreecommitdiff
path: root/java/android/OlmLibSdk/olm-sdk/src/androidTest
diff options
context:
space:
mode:
authorpedroGitt <pedro.contreiras@amdocs.com>2016-10-13 10:30:08 +0200
committerpedroGitt <pedro.contreiras@amdocs.com>2016-10-13 10:30:08 +0200
commit618eab0086e9f0911fe6ee8071068b163bec4ecd (patch)
tree922ead3d854139148b7e27bf6785334d6b2f7428 /java/android/OlmLibSdk/olm-sdk/src/androidTest
parent42c85adbc4ade043034d1cc620c49fc7583ed06b (diff)
Update SDK JAVA API making initNewAccount() private and called in the respective constructors
Diffstat (limited to 'java/android/OlmLibSdk/olm-sdk/src/androidTest')
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java7
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSessionTest.java15
2 files changed, 0 insertions, 22 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java
index 05480fc..ec1d49c 100644
--- a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java
+++ b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmAccountTest.java
@@ -70,11 +70,6 @@ public class OlmAccountTest {
public void test02CreateAccount() {
mOlmAccount = new OlmAccount();
assertNotNull(mOlmAccount);
- }
-
- @Test
- public void test03InitNewAccount() {
- assertTrue(mOlmAccount.initNewAccount());
mIsAccountCreated = true;
}
@@ -154,7 +149,6 @@ public class OlmAccountTest {
@Test
public void test10RemoveOneTimeKeysForSession() {
OlmSession olmSession = new OlmSession();
- olmSession.initNewSession();
long sessionId = olmSession.getOlmSessionId();
assertTrue(0 != sessionId);
@@ -189,7 +183,6 @@ public class OlmAccountTest {
Log.d(LOG_TAG, "## testJni(): lib version="+versionLib);
OlmAccount account = new OlmAccount();
- boolean initStatus = account.initNewAccount();
long accountNativeId = account.getOlmAccountId();
Log.d(LOG_TAG, "## testJni(): lib accountNativeId="+accountNativeId);
diff --git a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSessionTest.java b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSessionTest.java
index 56048cc..0b8e6b4 100644
--- a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSessionTest.java
+++ b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSessionTest.java
@@ -50,10 +50,7 @@ public class OlmSessionTest {
// creates alice & bob accounts
OlmAccount aliceAccount = new OlmAccount();
- aliceAccount.initNewAccount();
-
OlmAccount bobAccount = new OlmAccount();
- bobAccount.initNewAccount();
// test accounts creation
assertTrue(0!=bobAccount.getOlmAccountId());
@@ -88,7 +85,6 @@ public class OlmSessionTest {
// CREATE ALICE SESSION
OlmSession aliceSession = new OlmSession();
- aliceSession.initNewSession();
assertTrue(0!=aliceSession.getOlmSessionId());
// CREATE ALICE OUTBOUND SESSION and encrypt message to bob
@@ -100,7 +96,6 @@ public class OlmSessionTest {
// CREATE BOB INBOUND SESSION and decrypt message from alice
OlmSession bobSession = new OlmSession();
- bobSession.initNewSession();
assertTrue(0!=bobSession.getOlmSessionId());
assertNotNull(bobSession.initInboundSessionWithAccount(bobAccount, encryptedMsgToBob.mCipherText));
String decryptedMsg = bobSession.decryptMessage(encryptedMsgToBob);
@@ -140,10 +135,7 @@ public class OlmSessionTest {
// creates alice & bob accounts
OlmAccount aliceAccount = new OlmAccount();
- aliceAccount.initNewAccount();
-
OlmAccount bobAccount = new OlmAccount();
- bobAccount.initNewAccount();
// test accounts creation
assertTrue(0!=bobAccount.getOlmAccountId());
@@ -178,7 +170,6 @@ public class OlmSessionTest {
// CREATE ALICE SESSION
OlmSession aliceSession = new OlmSession();
- aliceSession.initNewSession();
assertTrue(0!=aliceSession.getOlmSessionId());
// CREATE ALICE OUTBOUND SESSION and encrypt message to bob
@@ -190,7 +181,6 @@ public class OlmSessionTest {
// CREATE BOB INBOUND SESSION and decrypt message from alice
OlmSession bobSession = new OlmSession();
- bobSession.initNewSession();
assertTrue(0!=bobSession.getOlmSessionId());
assertNotNull(bobSession.initInboundSessionWithAccount(bobAccount, encryptedAliceToBobMsg1.mCipherText));
@@ -237,10 +227,7 @@ public class OlmSessionTest {
public void test03AliceBobSessionId() {
// creates alice & bob accounts
OlmAccount aliceAccount = new OlmAccount();
- aliceAccount.initNewAccount();
-
OlmAccount bobAccount = new OlmAccount();
- bobAccount.initNewAccount();
// test accounts creation
assertTrue(0!=bobAccount.getOlmAccountId());
@@ -248,12 +235,10 @@ public class OlmSessionTest {
// CREATE ALICE SESSION
OlmSession aliceSession = new OlmSession();
- aliceSession.initNewSession();
assertTrue(0!=aliceSession.getOlmSessionId());
// CREATE BOB INBOUND SESSION and decrypt message from alice
OlmSession bobSession = new OlmSession();
- bobSession.initNewSession();
assertTrue(0!=bobSession.getOlmSessionId());
String aliceSessionId = aliceSession.sessionIdentifier();