未验证 提交 e72a11a7 编写于 作者: O openharmony_ci 提交者: Gitee

!7110 【元能力】移除createBundleContext测试用例

Merge pull request !7110 from HuangXW/Remove_createBundleContext
......@@ -39,25 +39,6 @@ export default function stageAppContextTest(abilityContext) {
}, 1000);
})
/**
* @tc.number: SUB_AA_OpenHarmony_ApplicationContext_0100
* @tc.name: Validating the context obtained by the AbilityContext call
* getApplicationContext can be obtained using createBundleContext
* @tc.desc: Function test
* @tc.level 0
*/
it('SUB_AA_OpenHarmony_ApplicationContext_0100', 0, async function (done) {
let TAG = "SUB_AA_OpenHarmony_ApplicationContext_0100";
console.log(TAG + " --- start");
let context = abilityContext.getApplicationContext();
let result = context.createBundleContext('com.example.stageappcontexttest')
let getCacheDir = result.cacheDir
console.log(TAG + 'getCacheDir::' + JSON.stringify(getCacheDir));
expect(getCacheDir).assertEqual('/data/app/el2/100/base/com.example.stageappcontexttest/cache')
done();
});
/**
* @tc.number: SUB_AA_OpenHarmony_ApplicationContext_0200
* @tc.name: Validating the context obtained by the AbilityContext call
......@@ -146,25 +127,6 @@ export default function stageAppContextTest(abilityContext) {
done();
});
/**
* @tc.number: SUB_AA_OpenHarmony_ApplicationContext_1100
* @tc.name: Verify that the application-level context call interface
* getApplicationContext gets the context using createBundleContext
* @tc.desc: Function test
* @tc.level 3
*/
it('SUB_AA_OpenHarmony_ApplicationContext_1100', 0, async function (done) {
let TAG = "SUB_AA_OpenHarmony_ApplicationContext_1100";
console.log(TAG + " --- start");
let context = abilityContext.getApplicationContext();
let context2 = context.getApplicationContext();
let result = context2.createBundleContext("com.example.stageappcontexttest");
let dir = result.cacheDir;
console.log(TAG + " dir = " + dir);
expect(dir).assertEqual("/data/app/el2/100/base/com.example.stageappcontexttest/cache");
done();
});
/**
* @tc.number: SUB_AA_OpenHarmony_ApplicationContext_1200
* @tc.name: Verify that the app-level context calls the interface
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册