diff --git a/DevEcoStudioProjects-achartengine.iml b/DevEcoStudioProjects-achartengine.iml deleted file mode 100644 index af241eb6eda63360293cafd9f7a4cb4c579dc524..0000000000000000000000000000000000000000 --- a/DevEcoStudioProjects-achartengine.iml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/README.OPENSOURCE b/README.OPENSOURCE index 7074eb06430d5f32b0a3d38aac612ed272924d71..c219b3b6868211bc4d31bafbe048b746a56bb9eb 100644 --- a/README.OPENSOURCE +++ b/README.OPENSOURCE @@ -6,7 +6,7 @@ "License": "Apache License", - "License File": "/License", + "License File": "License", "Version Number": "master", diff --git a/build.gradle b/build.gradle index a11b0edf749fd22339c22cc766ba725b34fe17c4..948f9ca0b9ba02257ec0716c941796ab900463ed 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,7 @@ buildscript { } dependencies { classpath 'com.huawei.ohos:hap:2.4.2.7' + classpath 'com.huawei.ohos:decctest:1.0.0.7' } } diff --git a/build/outputs/hap/debug/phone/entry-debug-rich-signed.hap b/build/outputs/hap/debug/phone/entry-debug-rich-signed.hap deleted file mode 100644 index 44ce589a99912e1bad721e7b964bfef14e6160ab..0000000000000000000000000000000000000000 Binary files a/build/outputs/hap/debug/phone/entry-debug-rich-signed.hap and /dev/null differ diff --git a/build/outputs/hap/debug/phone/entry-debug-signed.hap b/build/outputs/hap/debug/phone/entry-debug-signed.hap deleted file mode 100644 index 3e2a875bb41e184ce6cab91029587760a7c39971..0000000000000000000000000000000000000000 Binary files a/build/outputs/hap/debug/phone/entry-debug-signed.hap and /dev/null differ diff --git a/build/outputs/hap/debug/tablet/entry-debug-rich-signed.hap b/build/outputs/hap/debug/tablet/entry-debug-rich-signed.hap deleted file mode 100644 index 44ce589a99912e1bad721e7b964bfef14e6160ab..0000000000000000000000000000000000000000 Binary files a/build/outputs/hap/debug/tablet/entry-debug-rich-signed.hap and /dev/null differ diff --git a/entry/build.gradle b/entry/build.gradle index ab0a11acb01663a0b1403375138cd1d4645aab0d..6d829d9b60cafbf0a7ecc1a4fd1ebf3323b3bd8b 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 { compileSdkVersion 5 defaultConfig { @@ -9,5 +10,9 @@ ohos { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) testCompile'junit:junit:4.12' + ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100' implementation project(":achartengine") } +decc { + supportType = ['html','xml'] +} \ No newline at end of file diff --git a/entry/src/main/config.json b/entry/src/main/config.json index fcb010c54951dd2312f7d8c534d49f91b90c4d3b..272bdcc232ea25f1f735e26d6bccb005029aa9c0 100644 --- a/entry/src/main/config.json +++ b/entry/src/main/config.json @@ -3,8 +3,8 @@ "bundleName": "org.achartengine.chartdemo.demo", "vendor": "achartengine", "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 0000000000000000000000000000000000000000..c72cce3d0c3f04183ad2d45250ad2dcb8a1f404c --- /dev/null +++ b/entry/src/ohosTest/config.json @@ -0,0 +1,40 @@ +{ + "app": { + "bundleName": "org.achartengine.chartdemo.demo", + "vendor": "achartengine", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 5, + "target": 5, + "releaseType": "Release" + } + }, + "deviceConfig": {}, + "module": { + "package": "org.achartengine.chartdemo.demo", + "name": "testModule", + "deviceType": [ + "phone", + "tablet" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry_test", + "moduleType": "feature", + "installationFree": true + }, + "abilities": [ + { + "name": "decc.testkit.runner.EntryAbility", + "description": "Test Entry Ability", + "launchType": "standard", + "orientation": "landscape", + "visible": true, + "type": "page" + } + ] + } +} \ No newline at end of file diff --git a/entry/src/ohosTest/java/org/achartengine/chartdemo/demo/ExampleOhosTest.java b/entry/src/ohosTest/java/org/achartengine/chartdemo/demo/ExampleOhosTest.java new file mode 100644 index 0000000000000000000000000000000000000000..a85dc2083382d3892e1193a473b44e0597d3e4f0 --- /dev/null +++ b/entry/src/ohosTest/java/org/achartengine/chartdemo/demo/ExampleOhosTest.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.achartengine.chartdemo.demo; + + + +import ohos.aafwk.ability.Ability; +import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry; +import ohos.agp.colors.RgbPalette; +import ohos.agp.components.Attr; +import ohos.agp.components.AttrSet; +import ohos.agp.utils.Color; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class ExampleOhosTest { +// private static Line line; + @Test + public void testBundleName() { + final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName(); + assertEquals("org.achartengine.chartdemo.demo", actualBundleName); + } + + +} \ No newline at end of file