提交 56da5c7f 编写于 作者: U ustblx

【distributeddatamgr】【UDMF】add and modify UDMF api test case.

Signed-off-by: Nustblx <lvxin29@huawei.com>
Change-Id: I8a0e233c784efb96e7781fe5b24c717af7b381df
上级 783ad2f9
...@@ -19,7 +19,7 @@ import uniformTypeDescriptor from '@ohos.data.uniformTypeDescriptor'; ...@@ -19,7 +19,7 @@ import uniformTypeDescriptor from '@ohos.data.uniformTypeDescriptor';
export default function UDMFApiTest() { export default function UDMFApiTest() {
describe('UDMFApiTest', function () { describe('UDMFApiTest', function () {
console.info('---start UDMFApiTest--'); console.info('start UDMFApiTest');
let text = new unifiedDataChannel.Text(); let text = new unifiedDataChannel.Text();
text.details = { text.details = {
title:"标题", title:"标题",
...@@ -191,7 +191,7 @@ export default function UDMFApiTest() { ...@@ -191,7 +191,7 @@ export default function UDMFApiTest() {
console.info('SUB_DistributedData_Udmf_API003 start'); console.info('SUB_DistributedData_Udmf_API003 start');
let unifiedData = new unifiedDataChannel.UnifiedData(link); let unifiedData = new unifiedDataChannel.UnifiedData(link);
let records = unifiedData.getRecords(); let records = unifiedData.getRecords();
let record = <unifiedDataChannel.Link>(records[0]); let record = <unifiedDataChannel.Hyperlink>(records[0]);
expect(records.length).assertEqual(1); expect(records.length).assertEqual(1);
expect(record.details.title).assertEqual('标题'); expect(record.details.title).assertEqual('标题');
expect(record.details.content).assertEqual('内容'); expect(record.details.content).assertEqual('内容');
...@@ -213,7 +213,7 @@ export default function UDMFApiTest() { ...@@ -213,7 +213,7 @@ export default function UDMFApiTest() {
console.info('SUB_DistributedData_Udmf_API004 start'); console.info('SUB_DistributedData_Udmf_API004 start');
let unifiedData = new unifiedDataChannel.UnifiedData(html); let unifiedData = new unifiedDataChannel.UnifiedData(html);
let records = unifiedData.getRecords(); let records = unifiedData.getRecords();
let record = <unifiedDataChannel.Html>(records[0]); let record = <unifiedDataChannel.HTML>(records[0]);
expect(records.length).assertEqual(1); expect(records.length).assertEqual(1);
expect(record.details.title).assertEqual('标题'); expect(record.details.title).assertEqual('标题');
expect(record.details.content).assertEqual('内容'); expect(record.details.content).assertEqual('内容');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册