Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e46fd0f7
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e46fd0f7
编写于
8月 18, 2021
作者:
Y
yangzhouwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add distributeddatamgr js unit test.
Signed-off-by:
N
yangzhouwei
<
yangzhouwei1@huawei.com
>
上级
f11e1701
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
14 deletion
+19
-14
distributeddatamgr/distributeddatamgrjstest/hap/entry-test-signed.hap
...atamgr/distributeddatamgrjstest/hap/entry-test-signed.hap
+0
-0
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/config.json
...r/distributeddatamgrjstest/hap/entry/src/main/config.json
+6
-6
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
...ntry/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
+7
-4
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/js/test/SingleKvStorePromiseJsunit.test.js
...entry/src/main/js/test/SingleKvStorePromiseJsunit.test.js
+5
-3
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/resources/base/element/string.json
...est/hap/entry/src/main/resources/base/element/string.json
+1
-1
未找到文件。
distributeddatamgr/distributeddatamgrjstest/hap/entry-test-signed.hap
浏览文件 @
e46fd0f7
无法预览此类型文件
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/config.json
浏览文件 @
e46fd0f7
{
{
"app"
:
{
"app"
:
{
"bundleName"
:
"
com.example.datamanagertest
"
,
"bundleName"
:
"
ohos.acts.distributeddatamgr
"
,
"vendor"
:
"example"
,
"vendor"
:
"example"
,
"version"
:
{
"version"
:
{
"code"
:
2
000000
,
"code"
:
1
000000
,
"name"
:
"
2
.0.0"
"name"
:
"
1
.0.0"
}
}
},
},
"deviceConfig"
:
{},
"deviceConfig"
:
{},
"module"
:
{
"module"
:
{
"package"
:
"
com.example.datamanagertest
"
,
"package"
:
"
ohos.acts.distributeddatamgr
"
,
"name"
:
".MyApplication"
,
"name"
:
".MyApplication"
,
"mainAbility"
:
"
com.example.datamanagertest
.MainAbility"
,
"mainAbility"
:
"
ohos.acts.distributeddatamgr
.MainAbility"
,
"deviceType"
:
[
"deviceType"
:
[
"phone"
"phone"
],
],
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
]
]
}
}
],
],
"name"
:
"
com.example.datamanagertest
.MainAbility"
,
"name"
:
"
ohos.acts.distributeddatamgr
.MainAbility"
,
"icon"
:
"$media:icon"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"label"
:
"$string:app_name"
,
...
...
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/js/test/SingleKvStoreCallbackJsunit.test.js
浏览文件 @
e46fd0f7
...
@@ -25,12 +25,15 @@ const VALUE_TEST_FLOAT_ELEMENT = 4321.12;
...
@@ -25,12 +25,15 @@ const VALUE_TEST_FLOAT_ELEMENT = 4321.12;
const
VALUE_TEST_BOOLEAN_ELEMENT
=
true
;
const
VALUE_TEST_BOOLEAN_ELEMENT
=
true
;
const
VALUE_TEST_STRING_ELEMENT
=
'
value-string-002
'
;
const
VALUE_TEST_STRING_ELEMENT
=
'
value-string-002
'
;
const
SINGLE_VERSION
=
1
;
const
SECURITY_LEVEL
=
3
;
var
kvManager
=
null
;
var
kvManager
=
null
;
var
kvStore
=
null
;
var
kvStore
=
null
;
describe
(
'
KvStoreTest
'
,
function
()
{
describe
(
'
KvStoreTest
'
,
function
()
{
const
config
=
{
const
config
=
{
bundleName
:
'
com.example.datamanagertest
'
,
bundleName
:
'
ohos.acts.distributeddatamgr
'
,
userInfo
:
{
userInfo
:
{
userId
:
'
0
'
,
userId
:
'
0
'
,
userType
:
0
userType
:
0
...
@@ -42,9 +45,9 @@ describe('KvStoreTest', function () {
...
@@ -42,9 +45,9 @@ describe('KvStoreTest', function () {
encrypt
:
false
,
encrypt
:
false
,
backup
:
false
,
backup
:
false
,
autoSync
:
true
,
autoSync
:
true
,
kvStoreType
:
1
,
kvStoreType
:
SINGLE_VERSION
,
schema
:
''
,
schema
:
''
,
securityLevel
:
3
,
securityLevel
:
SECURITY_LEVEL
,
}
}
it
(
'
testCreateKVManager102
'
,
0
,
async
function
(
done
)
{
it
(
'
testCreateKVManager102
'
,
0
,
async
function
(
done
)
{
...
@@ -272,7 +275,7 @@ describe('KvStoreTest', function () {
...
@@ -272,7 +275,7 @@ describe('KvStoreTest', function () {
done
();
done
();
})
})
it
(
'
testOnChange10
1
'
,
0
,
async
function
(
done
)
{
it
(
'
testOnChange10
0
'
,
0
,
async
function
(
done
)
{
try
{
try
{
kvStore
.
on
(
'
dataChange
'
,
0
,
function
(
data
)
{
kvStore
.
on
(
'
dataChange
'
,
0
,
function
(
data
)
{
expect
(
true
).
assertEqual
(
data
!=
null
);
expect
(
true
).
assertEqual
(
data
!=
null
);
...
...
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/js/test/SingleKvStorePromiseJsunit.test.js
浏览文件 @
e46fd0f7
...
@@ -24,13 +24,15 @@ const VALUE_TEST_INT_ELEMENT = 123;
...
@@ -24,13 +24,15 @@ const VALUE_TEST_INT_ELEMENT = 123;
const
VALUE_TEST_FLOAT_ELEMENT
=
321.12
;
const
VALUE_TEST_FLOAT_ELEMENT
=
321.12
;
const
VALUE_TEST_BOOLEAN_ELEMENT
=
true
;
const
VALUE_TEST_BOOLEAN_ELEMENT
=
true
;
const
VALUE_TEST_STRING_ELEMENT
=
'
value-string-001
'
;
const
VALUE_TEST_STRING_ELEMENT
=
'
value-string-001
'
;
const
SINGLE_VERSION
=
1
;
const
SECURITY_LEVEL
=
3
;
var
kvManager
=
null
;
var
kvManager
=
null
;
var
kvStore
=
null
;
var
kvStore
=
null
;
describe
(
'
KvStoreTest
'
,
function
()
{
describe
(
'
KvStoreTest
'
,
function
()
{
const
config
=
{
const
config
=
{
bundleName
:
'
com.example.datamanagertest
'
,
bundleName
:
'
ohos.acts.distributeddatamgr
'
,
userInfo
:
{
userInfo
:
{
userId
:
'
0
'
,
userId
:
'
0
'
,
userType
:
0
userType
:
0
...
@@ -42,9 +44,9 @@ describe('KvStoreTest', function () {
...
@@ -42,9 +44,9 @@ describe('KvStoreTest', function () {
encrypt
:
false
,
encrypt
:
false
,
backup
:
false
,
backup
:
false
,
autoSync
:
true
,
autoSync
:
true
,
kvStoreType
:
1
,
kvStoreType
:
SINGLE_VERSION
,
schema
:
''
,
schema
:
''
,
securityLevel
:
3
,
securityLevel
:
SECURITY_LEVEL
,
}
}
it
(
'
testCreateKVManager001
'
,
0
,
async
function
(
done
)
{
it
(
'
testCreateKVManager001
'
,
0
,
async
function
(
done
)
{
...
...
distributeddatamgr/distributeddatamgrjstest/hap/entry/src/main/resources/base/element/string.json
浏览文件 @
e46fd0f7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"string"
:
[
"string"
:
[
{
{
"name"
:
"app_name"
,
"name"
:
"app_name"
,
"value"
:
"
MyApplication
"
"value"
:
"
DistributeddatamgrJsTest
"
},
},
{
{
"name"
:
"mainability_description"
,
"name"
:
"mainability_description"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录