forked from Tencent/Shadow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'manager_db_upgrade_dev' into 'master'
manager_db_upgrade_dev See merge request !76
- Loading branch information
Showing
68 changed files
with
2,145 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...host-apk/src/androidTest/java/com/tencent/shadow/demo/host/ActivityContextSubDirTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.tencent.shadow.demo.host; | ||
|
||
import android.content.Intent; | ||
|
||
import androidx.test.core.app.ApplicationProvider; | ||
|
||
public class ActivityContextSubDirTest extends SubDirContextThemeWrapperTest { | ||
@Override | ||
Intent getLaunchIntent() { | ||
Intent pluginIntent = new Intent(); | ||
String packageName = ApplicationProvider.getApplicationContext().getPackageName(); | ||
pluginIntent.setClassName( | ||
packageName, | ||
"com.tencent.shadow.demo.usecases.context.ActivityContextSubDirTestActivity" | ||
); | ||
return pluginIntent; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...t-apk/src/androidTest/java/com/tencent/shadow/demo/host/ApplicationContextSubDirTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.tencent.shadow.demo.host; | ||
|
||
import android.content.Intent; | ||
|
||
import androidx.test.core.app.ApplicationProvider; | ||
|
||
public class ApplicationContextSubDirTest extends SubDirContextThemeWrapperTest { | ||
@Override | ||
Intent getLaunchIntent() { | ||
Intent pluginIntent = new Intent(); | ||
String packageName = ApplicationProvider.getApplicationContext().getPackageName(); | ||
pluginIntent.setClassName( | ||
packageName, | ||
"com.tencent.shadow.demo.usecases.context.ApplicationContextSubDirTestActivity" | ||
); | ||
return pluginIntent; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...ts/demo/host-apk/src/androidTest/java/com/tencent/shadow/demo/host/HostInterfaceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.tencent.shadow.demo.host; | ||
|
||
import android.content.Intent; | ||
|
||
import androidx.test.core.app.ApplicationProvider; | ||
import androidx.test.espresso.Espresso; | ||
import androidx.test.espresso.action.ViewActions; | ||
import androidx.test.espresso.matcher.ViewMatchers; | ||
|
||
import com.tencent.shadow.demo.interfaces.HostTestInterface; | ||
import com.tencent.shadow.demo.other.HostOtherInterface; | ||
|
||
import org.hamcrest.Matchers; | ||
import org.junit.Test; | ||
|
||
public class HostInterfaceTest extends BaseTest { | ||
|
||
@Override | ||
Intent getLaunchIntent() { | ||
Intent pluginIntent = new Intent(); | ||
String packageName = ApplicationProvider.getApplicationContext().getPackageName(); | ||
pluginIntent.setClassName( | ||
packageName, | ||
"com.tencent.shadow.demo.usecases.interfaces.TestHostInterfaceActivity" | ||
); | ||
return pluginIntent; | ||
} | ||
|
||
@Test | ||
public void testHostInterfaceTest() { | ||
Espresso.onView(ViewMatchers.withTagValue(Matchers.<Object>is("button"))).perform(ViewActions.click()); | ||
|
||
matchTextWithViewTag("text", HostTestInterface.getText()); | ||
|
||
Espresso.onView(ViewMatchers.withTagValue(Matchers.<Object>is("button1"))).perform(ViewActions.click()); | ||
|
||
matchTextWithViewTag("text", "ClassNotFound"); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
.../host-apk/src/androidTest/java/com/tencent/shadow/demo/host/ServiceContextSubDirTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.tencent.shadow.demo.host; | ||
|
||
import android.content.Intent; | ||
|
||
import androidx.test.core.app.ApplicationProvider; | ||
|
||
public class ServiceContextSubDirTest extends SubDirContextThemeWrapperTest { | ||
@Override | ||
Intent getLaunchIntent() { | ||
Intent pluginIntent = new Intent(); | ||
String packageName = ApplicationProvider.getApplicationContext().getPackageName(); | ||
pluginIntent.setClassName( | ||
packageName, | ||
"com.tencent.shadow.demo.usecases.context.ServiceContextSubDirTestActivity" | ||
); | ||
return pluginIntent; | ||
} | ||
} |
Oops, something went wrong.