Skip to content

Commit db3b422

Browse files
committed
Mr review
1 parent f72c373 commit db3b422

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

connect-sdk/src/androidTest/java/com/mastercard/openbanking/connect/ConnectActivityTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class ConnectActivityTest {
4646
private static String goodUrl = "";
4747
private static final String badExpiredUrl = "https://connect2.finicity.com?consumerId=dbceec20d8b97174e6aed204856f5a55&customerId=1016927519&partnerId=2445582695152&signature=abb1762e5c640f02823c56332daede3fe2f2143f4f5b8be6ec178ac72d7dbc5a&timestamp=1607806595887&ttl=1607813795887";
4848
private WebEventIdlingResource mIdlingResource;
49-
private static String deepLinkUrl = "";
49+
private static String redirectUrl = "";
5050

5151
@Before
5252
public void setup() {
@@ -66,7 +66,7 @@ public void teardown() {
6666

6767
@Test
6868
public void test01ConnectWithExpiredUrl() {
69-
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, deepLinkUrl, new TestEventHandler());
69+
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, redirectUrl, new TestEventHandler());
7070

7171
mIdlingResource.waitForEvent("error");
7272
onWebView().withElement(findElement(Locator.LINK_TEXT, "Exit")).perform(webClick());
@@ -92,7 +92,7 @@ public void test02ConnectWithGoodUrlThenCancel() throws InterruptedException {
9292
public void test03ConnectWithGoodUrlThenBackButton() {
9393

9494
String url = goodUrl.replace("localhost:", "10.0.2.2:");
95-
Connect.start(InstrumentationRegistry.getContext(), url, deepLinkUrl, new TestEventHandler());
95+
Connect.start(InstrumentationRegistry.getContext(), url, redirectUrl, new TestEventHandler());
9696

9797
// Wait for Route search or let it timeout
9898
mIdlingResource.waitForEvent("search");
@@ -115,7 +115,7 @@ public void test03ConnectWithGoodUrlThenBackButton() {
115115
public void test04ConnectWithGoodUrlThenBackButtonAndCancel() {
116116

117117
String url = goodUrl.replace("localhost:", "10.0.2.2:");
118-
Connect.start(InstrumentationRegistry.getContext(), url, deepLinkUrl, new TestEventHandler());
118+
Connect.start(InstrumentationRegistry.getContext(), url, redirectUrl, new TestEventHandler());
119119

120120
// Wait for Route search or let it timeout
121121
mIdlingResource.waitForEvent("search");
@@ -129,7 +129,7 @@ public void test04ConnectWithGoodUrlThenBackButtonAndCancel() {
129129
public void test05ConnectWithGoodUrlThenPrivacyPolicy() throws InterruptedException {
130130

131131
String url = goodUrl.replace("localhost:", "10.0.2.2:");
132-
Connect.start(InstrumentationRegistry.getContext(), url, deepLinkUrl, new TestEventHandler());
132+
Connect.start(InstrumentationRegistry.getContext(), url, redirectUrl, new TestEventHandler());
133133

134134
// Wait for Route search or let it timeout
135135
mIdlingResource.waitForEvent("search");
@@ -156,7 +156,7 @@ public void test05ConnectWithGoodUrlThenPrivacyPolicy() throws InterruptedExcept
156156
public void test06ConnectWithGoodUrlThenAddBankAccount() throws InterruptedException {
157157

158158
String url = goodUrl.replace("localhost:", "10.0.2.2:");
159-
Connect.start(InstrumentationRegistry.getContext(), url, deepLinkUrl, new TestEventHandler());
159+
Connect.start(InstrumentationRegistry.getContext(), url, redirectUrl, new TestEventHandler());
160160

161161
// Wait for Route search or let it timeout
162162
mIdlingResource.waitForEvent("search");
@@ -204,7 +204,7 @@ public void test06ConnectWithGoodUrlThenAddBankAccount() throws InterruptedExcep
204204

205205
@Test
206206
public void test07ConnectWithExpiredUrlThenFinishActivity() throws InterruptedException {
207-
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, deepLinkUrl, new TestEventHandler());
207+
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, redirectUrl, new TestEventHandler());
208208
Thread.sleep(10000);
209209
Connect.finishCurrentActivity();
210210
}
@@ -222,12 +222,12 @@ public void test08FinishActivity() {
222222

223223
@Test
224224
public void test09AlreadyRunning() throws InterruptedException {
225-
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, deepLinkUrl, new TestEventHandler());
225+
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, redirectUrl, new TestEventHandler());
226226
Thread.sleep(5000);
227227

228228
// Try and start a 2nd Activity
229229
try {
230-
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, deepLinkUrl, new TestEventHandler());
230+
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, redirectUrl, new TestEventHandler());
231231
fail("Should have thrown runtime exception");
232232
} catch(RuntimeException e) {
233233
//success
@@ -236,7 +236,7 @@ public void test09AlreadyRunning() throws InterruptedException {
236236

237237
@Test
238238
public void test10NullEventHandler() throws InterruptedException {
239-
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, deepLinkUrl,null);
239+
Connect.start(InstrumentationRegistry.getContext(), badExpiredUrl, redirectUrl,null);
240240
Thread.sleep(5000);
241241
}
242242

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<resources>
22
<string name="app_name">Connect SDK demo app</string>
33
<string name="handler_start_button_text">Launch Connect</string>
4-
<string name="deepLinkUrl">partnerapp</string>
54
</resources>

0 commit comments

Comments
 (0)