From 0c79274f3ae4633ceef65fa4c35dfdf12d236f4c Mon Sep 17 00:00:00 2001 From: banban <9010293+banban61@user.noreply.gitee.com> Date: Tue, 1 Jun 2021 14:58:02 +0800 Subject: [PATCH] readme --- README.md | 2 +- build.gradle | 2 +- entry/build.gradle | 5 ++- entry/src/main/config.json | 4 +- entry/src/ohosTest/config.json | 41 +++++++++++++++++++ .../gridpasswordview/ExampleOhosTest.java | 14 +++++++ library/build.gradle | 2 +- 7 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 entry/src/ohosTest/config.json create mode 100644 entry/src/ohosTest/java/com/jungly/gridpasswordview/ExampleOhosTest.java diff --git a/README.md b/README.md index b6a0c36..0b51b35 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ - 项目移植状态:主功能完成 - 调用差异:无 - 开发版本:sdk5,DevEco Studio2.1 beta4 -- 基线版本:GridPasswordView组件 Releases V0.3 +- 基线版本:Releases V0.3 #### 项目演示 diff --git a/build.gradle b/build.gradle index 2368e1d..948f9ca 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ buildscript { } dependencies { classpath 'com.huawei.ohos:hap:2.4.2.7' - classpath 'com.huawei.ohos:decctest:1.0.0.6' + classpath 'com.huawei.ohos:decctest:1.0.0.7' } } diff --git a/entry/build.gradle b/entry/build.gradle index c0ff8e8..f6a3a6e 100644 --- a/entry/build.gradle +++ b/entry/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.huawei.ohos.hap' +apply plugin: 'com.huawei.ohos.decctest' ohos { signingConfigs { @@ -11,7 +12,7 @@ ohos { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) - testCompile 'junit:junit:4.12' + testImplementation 'junit:junit:4.13' compile project(path: ':library') - + ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100' } diff --git a/entry/src/main/config.json b/entry/src/main/config.json index da8d5a2..f759bf7 100644 --- a/entry/src/main/config.json +++ b/entry/src/main/config.json @@ -3,8 +3,8 @@ "bundleName": "com.jungly.gridpasswordview", "vendor": "jungly", "version": { - "code": 1, - "name": "1.0" + "code": 1000000, + "name": "1.0.0" }, "apiVersion": { "compatible": 5, diff --git a/entry/src/ohosTest/config.json b/entry/src/ohosTest/config.json new file mode 100644 index 0000000..d4b48ad --- /dev/null +++ b/entry/src/ohosTest/config.json @@ -0,0 +1,41 @@ +{ + "app": { + "bundleName": "com.jungly.gridpasswordview", + "vendor": "jungly", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Release" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.jungly.gridpasswordview", + "name": "testModule", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry_test", + "moduleType": "feature", + "installationFree": true + }, + "abilities": [ + { + "name": "decc.testkit.runner.EntryAbility", + "description": "Test Entry Ability", + "icon": "$media:icon", + "label": "GridPasswordView", + "launchType": "standard", + "orientation": "landscape", + "visible": true, + "type": "page" + } + ] + } +} \ No newline at end of file diff --git a/entry/src/ohosTest/java/com/jungly/gridpasswordview/ExampleOhosTest.java b/entry/src/ohosTest/java/com/jungly/gridpasswordview/ExampleOhosTest.java new file mode 100644 index 0000000..3e93bce --- /dev/null +++ b/entry/src/ohosTest/java/com/jungly/gridpasswordview/ExampleOhosTest.java @@ -0,0 +1,14 @@ +package com.jungly.gridpasswordview; + +import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class ExampleOhosTest { + @Test + public void testBundleName() { + final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName(); + assertEquals("com.jungly.gridpasswordview", actualBundleName); + } +} \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle index 276eacf..952ec2c 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -10,5 +10,5 @@ ohos { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - testCompile'junit:junit:4.12' + testImplementation 'junit:junit:4.13' } -- Gitee