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

!9023 【Distributeddatamgr】【Master】UDMF用例新增

Merge pull request !9023 from yanglifeng/master
......@@ -13,8 +13,11 @@
* limitations under the License.
*/
import UDMFApiTest from './UDMF.test.ets'
import UDMFApiCallback from './UDMFApiCallback.test'
import UDMFApiPromise from './UDMFApiPromise.test'
import UDMFApiTest from './UDMF.test'
export default function testsuite() {
UDMFApiCallback()
UDMFApiPromise()
UDMFApiTest()
}
......@@ -78,6 +78,13 @@ export default function UDMFApiTest() {
};
video.videoUri = "videoUri";
let Audio = new UDMF.Audio();
Audio.details = {
title:"标题",
content:"内容"
};
Audio.audioUri = "audioUri";
let arrayBuf = new ArrayBuffer(2 * 3 * 4);
let u8Array = new Uint8Array(arrayBuf);
......@@ -125,6 +132,11 @@ export default function UDMFApiTest() {
applicationDefinedRecord.applicationDefinedType = 'applicationDefinedType';
applicationDefinedRecord.rawData = u8Array;
let summary = new UDMF.Summary;
let records1 = summary.summary;
console.info("ttt " + records1);
let records2 = summary.totalSize;
/**
* @tc.number SUB_DistributedData_Udmf_API001
* @tc.name CreateData
......@@ -473,5 +485,26 @@ export default function UDMFApiTest() {
console.info("SUB_DistributedData_Udmf_API014 end");
done();
})
/**
* @tc.number SUB_DistributedData_Udmf_API015
* @tc.name CreateData
* @tc.desc Test UDMF creating a unifieddata with a Audio record.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it('SUB_DistributedData_Udmf_API015',0, function (done) {
console.info('SUB_DistributedData_Udmf_API008 start');
let unifiedData = new UDMF.UnifiedData(Audio);
let records = unifiedData.getRecords();
let record = <UDMF.Audio>(records[0]);
expect(records.length).assertEqual(1);
expect(record.details.title).assertEqual('标题');
expect(record.details.content).assertEqual('内容');
console.info("SUB_DistributedData_Udmf_API008 end");
done();
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册