Skip to content

Commit c64d5a0

Browse files
committed
test: update test applications and test cases for singleton pattern changes
- Update BranchTest to work with simplified singleton pattern - Update CustomBranchApp in TestBed to use getInstance() method - Clean up MainActivity test code - Update BranchWrapper in automation testbed to align with API changes - Ensure all test applications continue to work after API simplification
1 parent ac0bd1d commit c64d5a0

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Branch-SDK-Automation-TestBed/src/main/java/io/branch/branchandroiddemo/BranchWrapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public void delayInitializationIfRequired(Intent intent){
131131
if (testDataStr != null) {
132132
TestData testDataObj = new TestData();
133133
Boolean delayInit = testDataObj.getBoolParamValue(testDataStr, "DelayInitialization");
134-
if ( delayInit) {
135-
// Branch.expectDelayedSessionInitialization(true);
134+
if (delayInit) {
135+
// Removed deprecated methods
136136
}
137137
}
138138
}

Branch-SDK-TestBed/src/main/java/io/branch/branchandroidtestbed/CustomBranchApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void onCreate() {
2626
// saveLogToFile(message);
2727
// };
2828
Branch.enableLogging(BranchLogger.BranchLogLevel.VERBOSE);
29-
Branch.getAutoInstance(this);
29+
Branch.getInstance();
3030
CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder()
3131
.setColorScheme(COLOR_SCHEME_DARK)
3232
.build();

Branch-SDK-TestBed/src/main/java/io/branch/branchandroidtestbed/MainActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ public void onFailure(Exception e) {
575575
public void onClick(View v) {
576576
Branch.getInstance().logout();
577577
Toast.makeText(getApplicationContext(), "Logged Out", Toast.LENGTH_LONG).show();
578-
579578
}
580579
});
581580

Branch-SDK/src/androidTest/java/io/branch/referral/BranchTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ protected void initBranchInstance(String branchKey) {
8585
Branch.enableLogging();
8686

8787
if (branchKey == null) {
88-
branch = Branch.getAutoInstance(getTestContext());
88+
branch = Branch.getInstance();
8989
} else {
90-
branch = Branch.getAutoInstance(getTestContext(), branchKey);
90+
branch = Branch.getInstance();
9191
}
9292
Assert.assertEquals(branch, Branch.getInstance());
9393

0 commit comments

Comments
 (0)