From 3375daf3dd7865cf8edcf75809db24d2be1bfedd Mon Sep 17 00:00:00 2001 From: Catherine_MK Date: Fri, 16 Jul 2021 11:31:35 +0800 Subject: [PATCH] houjing8@huawei.com Signed-off-by: Catherine_MK --- .../java/com/example/assertion/MainAbility.java | 16 ---------------- .../com/example/assertion/MyApplication.java | 10 ---------- .../Assertion/entry/src/main/js/default/app.js | 14 ++++++++++++++ .../src/main/js/default/pages/index/index.js | 14 ++++++++++++++ .../com/example/assertion/ExampleOhosTest.java | 14 -------------- .../entry/src/ohosTest/js/default/app.js | 14 ++++++++++++++ .../src/ohosTest/js/default/pages/index/index.js | 14 ++++++++++++++ .../src/ohosTest/js/test/ExampleJsunit.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertClose.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertContain.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertFail.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertFalse.test.js | 14 ++++++++++++++ .../ohosTest/js/test/assertInstantceOf.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertLarger.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertLess.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertNull.test.js | 14 ++++++++++++++ .../ohosTest/js/test/assertThrowError.test.js | 14 ++++++++++++++ .../src/ohosTest/js/test/assertUndefined.test.js | 14 ++++++++++++++ .../main/java/com/example/async/MainAbility.java | 16 ---------------- .../java/com/example/async/MyApplication.java | 10 ---------- .../Async/entry/src/main/js/default/app.js | 14 ++++++++++++++ .../src/main/js/default/pages/index/index.js | 14 ++++++++++++++ .../java/com/example/async/ExampleOhosTest.java | 14 -------------- .../Async/entry/src/ohosTest/js/default/app.js | 14 ++++++++++++++ .../src/ohosTest/js/default/pages/index/index.js | 14 ++++++++++++++ .../entry/src/ohosTest/js/test/Callback.test.js | 14 ++++++++++++++ .../entry/src/ohosTest/js/test/List.test.js | 14 ++++++++++++++ .../entry/src/ohosTest/js/test/Promise.test.js | 14 ++++++++++++++ .../java/com/example/datadriver/MainAbility.java | 16 ---------------- .../com/example/datadriver/MyApplication.java | 10 ---------- .../DataDriver/entry/src/main/js/default/app.js | 14 ++++++++++++++ .../src/main/js/default/pages/index/index.js | 14 ++++++++++++++ .../com/example/datadriver/ExampleOhosTest.java | 14 -------------- .../entry/src/ohosTest/js/default/app.js | 14 ++++++++++++++ .../src/ohosTest/js/default/pages/index/index.js | 15 ++++++++++++++- .../src/ohosTest/js/test/DataDriver.test.js | 14 ++++++++++++++ .../entry/src/ohosTest/js/test/List.test.js | 14 ++++++++++++++ 37 files changed, 392 insertions(+), 121 deletions(-) delete mode 100755 demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MainAbility.java delete mode 100755 demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MyApplication.java delete mode 100755 demo/hjsunit/Assertion/entry/src/ohosTest/java/com/example/assertion/ExampleOhosTest.java delete mode 100755 demo/hjsunit/Async/entry/src/main/java/com/example/async/MainAbility.java delete mode 100755 demo/hjsunit/Async/entry/src/main/java/com/example/async/MyApplication.java delete mode 100755 demo/hjsunit/Async/entry/src/ohosTest/java/com/example/async/ExampleOhosTest.java delete mode 100755 demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MainAbility.java delete mode 100755 demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MyApplication.java delete mode 100755 demo/hjsunit/DataDriver/entry/src/ohosTest/java/com/example/datadriver/ExampleOhosTest.java diff --git a/demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MainAbility.java b/demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MainAbility.java deleted file mode 100755 index c048ef2af..000000000 --- a/demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MainAbility.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.assertion; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class MainAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} diff --git a/demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MyApplication.java b/demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MyApplication.java deleted file mode 100755 index 081cff049..000000000 --- a/demo/hjsunit/Assertion/entry/src/main/java/com/example/assertion/MyApplication.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.assertion; - -import ohos.aafwk.ability.AbilityPackage; - -public class MyApplication extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} diff --git a/demo/hjsunit/Assertion/entry/src/main/js/default/app.js b/demo/hjsunit/Assertion/entry/src/main/js/default/app.js index aedcefe00..4b241cccb 100755 --- a/demo/hjsunit/Assertion/entry/src/main/js/default/app.js +++ b/demo/hjsunit/Assertion/entry/src/main/js/default/app.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { onCreate() { console.info('AceApplication onCreate'); diff --git a/demo/hjsunit/Assertion/entry/src/main/js/default/pages/index/index.js b/demo/hjsunit/Assertion/entry/src/main/js/default/pages/index/index.js index 8a7eec535..49eb46a05 100755 --- a/demo/hjsunit/Assertion/entry/src/main/js/default/pages/index/index.js +++ b/demo/hjsunit/Assertion/entry/src/main/js/default/pages/index/index.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { data: { title: "" diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/java/com/example/assertion/ExampleOhosTest.java b/demo/hjsunit/Assertion/entry/src/ohosTest/java/com/example/assertion/ExampleOhosTest.java deleted file mode 100755 index 6bc1ef858..000000000 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/java/com/example/assertion/ExampleOhosTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.assertion; - -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.example.assertion", actualBundleName); - } -} \ No newline at end of file diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/app.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/app.js index 55b67e96d..044bffa75 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/app.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/app.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { onCreate() { console.info('TestApplication onCreate'); diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/pages/index/index.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/pages/index/index.js index 8be2df247..793667c97 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/pages/index/index.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/default/pages/index/index.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import file from '@system.file' import app from '@system.app' import device from '@system.device' diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/ExampleJsunit.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/ExampleJsunit.test.js index b6d74caed..bdc0912bf 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/ExampleJsunit.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/ExampleJsunit.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import app from '@system.app' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertClose.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertClose.test.js index 2fb1941c7..c082d4bd4 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertClose.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertClose.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertClose', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertContain.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertContain.test.js index 61e785262..9c5713a1e 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertContain.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertContain.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertContain', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFail.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFail.test.js index 4df6dec80..c09318bf0 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFail.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFail.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertFail', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFalse.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFalse.test.js index 0a9b45de4..f5cb01006 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFalse.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertFalse.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertFalse', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertInstantceOf.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertInstantceOf.test.js index 8cad22cf8..8c41cbeca 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertInstantceOf.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertInstantceOf.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertInstanceOf', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLarger.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLarger.test.js index b2eca31ca..48de09018 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLarger.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLarger.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertLarger', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLess.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLess.test.js index 930e0f895..5e404524c 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLess.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertLess.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertLess', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertNull.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertNull.test.js index 60d7078eb..0e774c6ed 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertNull.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertNull.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertNull', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertThrowError.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertThrowError.test.js index eaee8b518..7aba149a4 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertThrowError.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertThrowError.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertThrowError', function () { diff --git a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertUndefined.test.js b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertUndefined.test.js index e2fff4d6e..3c00a513c 100755 --- a/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertUndefined.test.js +++ b/demo/hjsunit/Assertion/entry/src/ohosTest/js/test/assertUndefined.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('assertUndefined', function () { diff --git a/demo/hjsunit/Async/entry/src/main/java/com/example/async/MainAbility.java b/demo/hjsunit/Async/entry/src/main/java/com/example/async/MainAbility.java deleted file mode 100755 index 95892cbcd..000000000 --- a/demo/hjsunit/Async/entry/src/main/java/com/example/async/MainAbility.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.async; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class MainAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} diff --git a/demo/hjsunit/Async/entry/src/main/java/com/example/async/MyApplication.java b/demo/hjsunit/Async/entry/src/main/java/com/example/async/MyApplication.java deleted file mode 100755 index 7efaa0069..000000000 --- a/demo/hjsunit/Async/entry/src/main/java/com/example/async/MyApplication.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.async; - -import ohos.aafwk.ability.AbilityPackage; - -public class MyApplication extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} diff --git a/demo/hjsunit/Async/entry/src/main/js/default/app.js b/demo/hjsunit/Async/entry/src/main/js/default/app.js index aedcefe00..4b241cccb 100755 --- a/demo/hjsunit/Async/entry/src/main/js/default/app.js +++ b/demo/hjsunit/Async/entry/src/main/js/default/app.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { onCreate() { console.info('AceApplication onCreate'); diff --git a/demo/hjsunit/Async/entry/src/main/js/default/pages/index/index.js b/demo/hjsunit/Async/entry/src/main/js/default/pages/index/index.js index 8a7eec535..49eb46a05 100755 --- a/demo/hjsunit/Async/entry/src/main/js/default/pages/index/index.js +++ b/demo/hjsunit/Async/entry/src/main/js/default/pages/index/index.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { data: { title: "" diff --git a/demo/hjsunit/Async/entry/src/ohosTest/java/com/example/async/ExampleOhosTest.java b/demo/hjsunit/Async/entry/src/ohosTest/java/com/example/async/ExampleOhosTest.java deleted file mode 100755 index e478b5e18..000000000 --- a/demo/hjsunit/Async/entry/src/ohosTest/java/com/example/async/ExampleOhosTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.async; - -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.example.async", actualBundleName); - } -} \ No newline at end of file diff --git a/demo/hjsunit/Async/entry/src/ohosTest/js/default/app.js b/demo/hjsunit/Async/entry/src/ohosTest/js/default/app.js index 55b67e96d..044bffa75 100755 --- a/demo/hjsunit/Async/entry/src/ohosTest/js/default/app.js +++ b/demo/hjsunit/Async/entry/src/ohosTest/js/default/app.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { onCreate() { console.info('TestApplication onCreate'); diff --git a/demo/hjsunit/Async/entry/src/ohosTest/js/default/pages/index/index.js b/demo/hjsunit/Async/entry/src/ohosTest/js/default/pages/index/index.js index 8be2df247..793667c97 100755 --- a/demo/hjsunit/Async/entry/src/ohosTest/js/default/pages/index/index.js +++ b/demo/hjsunit/Async/entry/src/ohosTest/js/default/pages/index/index.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import file from '@system.file' import app from '@system.app' import device from '@system.device' diff --git a/demo/hjsunit/Async/entry/src/ohosTest/js/test/Callback.test.js b/demo/hjsunit/Async/entry/src/ohosTest/js/test/Callback.test.js index ba9c23c51..6b95d985a 100755 --- a/demo/hjsunit/Async/entry/src/ohosTest/js/test/Callback.test.js +++ b/demo/hjsunit/Async/entry/src/ohosTest/js/test/Callback.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it} from 'deccjsunit/index' describe('callback', function () { diff --git a/demo/hjsunit/Async/entry/src/ohosTest/js/test/List.test.js b/demo/hjsunit/Async/entry/src/ohosTest/js/test/List.test.js index 22d893e68..e397df520 100755 --- a/demo/hjsunit/Async/entry/src/ohosTest/js/test/List.test.js +++ b/demo/hjsunit/Async/entry/src/ohosTest/js/test/List.test.js @@ -1,2 +1,16 @@ +/* + * 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. + */ require('./Callback.test.js') require('./Promise.test.js') \ No newline at end of file diff --git a/demo/hjsunit/Async/entry/src/ohosTest/js/test/Promise.test.js b/demo/hjsunit/Async/entry/src/ohosTest/js/test/Promise.test.js index 95a26e595..785f3e877 100755 --- a/demo/hjsunit/Async/entry/src/ohosTest/js/test/Promise.test.js +++ b/demo/hjsunit/Async/entry/src/ohosTest/js/test/Promise.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it} from 'deccjsunit/index' describe('promise', function () { diff --git a/demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MainAbility.java b/demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MainAbility.java deleted file mode 100755 index 1b674eba7..000000000 --- a/demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MainAbility.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.datadriver; - -import ohos.ace.ability.AceAbility; -import ohos.aafwk.content.Intent; - -public class MainAbility extends AceAbility { - @Override - public void onStart(Intent intent) { - super.onStart(intent); - } - - @Override - public void onStop() { - super.onStop(); - } -} diff --git a/demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MyApplication.java b/demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MyApplication.java deleted file mode 100755 index 897f67aa1..000000000 --- a/demo/hjsunit/DataDriver/entry/src/main/java/com/example/datadriver/MyApplication.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.datadriver; - -import ohos.aafwk.ability.AbilityPackage; - -public class MyApplication extends AbilityPackage { - @Override - public void onInitialize() { - super.onInitialize(); - } -} diff --git a/demo/hjsunit/DataDriver/entry/src/main/js/default/app.js b/demo/hjsunit/DataDriver/entry/src/main/js/default/app.js index aedcefe00..4b241cccb 100755 --- a/demo/hjsunit/DataDriver/entry/src/main/js/default/app.js +++ b/demo/hjsunit/DataDriver/entry/src/main/js/default/app.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { onCreate() { console.info('AceApplication onCreate'); diff --git a/demo/hjsunit/DataDriver/entry/src/main/js/default/pages/index/index.js b/demo/hjsunit/DataDriver/entry/src/main/js/default/pages/index/index.js index 8a7eec535..49eb46a05 100755 --- a/demo/hjsunit/DataDriver/entry/src/main/js/default/pages/index/index.js +++ b/demo/hjsunit/DataDriver/entry/src/main/js/default/pages/index/index.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { data: { title: "" diff --git a/demo/hjsunit/DataDriver/entry/src/ohosTest/java/com/example/datadriver/ExampleOhosTest.java b/demo/hjsunit/DataDriver/entry/src/ohosTest/java/com/example/datadriver/ExampleOhosTest.java deleted file mode 100755 index 0bba099e1..000000000 --- a/demo/hjsunit/DataDriver/entry/src/ohosTest/java/com/example/datadriver/ExampleOhosTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.datadriver; - -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.example.datadriver", actualBundleName); - } -} \ No newline at end of file diff --git a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/app.js b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/app.js index 55b67e96d..044bffa75 100755 --- a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/app.js +++ b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/app.js @@ -1,3 +1,17 @@ +/* + * 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. + */ export default { onCreate() { console.info('TestApplication onCreate'); diff --git a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/pages/index/index.js b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/pages/index/index.js index 18d416bc4..4ada57fb3 100755 --- a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/pages/index/index.js +++ b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/default/pages/index/index.js @@ -1,4 +1,17 @@ -// @ts-nocheck +/* + * 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. + */ import file from '@system.file' import app from '@system.app' import device from '@system.device' diff --git a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/DataDriver.test.js b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/DataDriver.test.js index c26e4a8d1..a7c331fdd 100755 --- a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/DataDriver.test.js +++ b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/DataDriver.test.js @@ -1,3 +1,17 @@ +/* + * 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. + */ import {describe, it, expect} from 'deccjsunit/index' describe('testSuite01', function () { diff --git a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/List.test.js b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/List.test.js index 8ed7c51f5..ee629d267 100755 --- a/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/List.test.js +++ b/demo/hjsunit/DataDriver/entry/src/ohosTest/js/test/List.test.js @@ -1 +1,15 @@ +/* + * 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. + */ require('./DataDriver.test.js') \ No newline at end of file -- GitLab