Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.tencent.shadow.test.cases.plugin_multidex;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({MultiDexV102Test.class, MultiDexV201Test.class})
public class MultiDexTest {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.tencent.shadow.test.cases.plugin_multidex;

import com.tencent.shadow.test.lib.constant.Constant;

public class MultiDexV102Test extends PluginMultiDexAppTest {
@Override
protected String getPartKey() {
return Constant.PART_KEY_MULTIDEX_V1_0_2;
}

@Override
protected String getActivityName() {
return "com.tencent.shadow.test.plugin.particular_cases.multidex.v1_0_2.PluginMultidexV1_0_2Activity";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.tencent.shadow.test.cases.plugin_multidex;

import com.tencent.shadow.test.lib.constant.Constant;

public class MultiDexV201Test extends PluginMultiDexAppTest {
@Override
protected String getPartKey() {
return Constant.PART_KEY_MULTIDEX_V2_0_1;
}

@Override
protected String getActivityName() {
return "com.tencent.shadow.test.plugin.particular_cases.multidex.v2_0_1.PluginMultidexV2_0_1Activity";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Tencent is pleased to support the open source community by making Tencent Shadow available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of
* the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.tencent.shadow.test.cases.plugin_multidex;

import android.content.Intent;

import androidx.test.core.app.ApplicationProvider;

import com.tencent.shadow.test.PluginTest;

import org.junit.Test;

public abstract class PluginMultiDexAppTest extends PluginTest {

abstract protected String getActivityName();

@Override
protected Intent getLaunchIntent() {
Intent pluginIntent = new Intent();
String packageName = ApplicationProvider.getApplicationContext().getPackageName();
pluginIntent.setClassName(
packageName,
getActivityName()
);
return pluginIntent;
}

@Test
public void testSuccessLaunch() {
//assert no crash
}
}