提交 35797be7 编写于 作者: B bayanxing

关系型数据库提交新用例

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 cc3d1768
......@@ -120,11 +120,15 @@ describe('rdbStoreTest', function () {
*/
it('testRdbStore0004', 0, async function (done) {
console.log(TAG + "************* testRdbStore0004 start *************");
let storePromise = dataRdb.getRdbStore(STORE_CONFIG, 6);
let storePromise = dataRdb.getRdbStore(STORE_CONFIG, 1);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
let deletePromise = dataRdb.deleteRdbStore("rdbstore.db")
deletePromise.then(()=>{
console.log(TAG + "deleteRdbStore promise done" + store);
expect(true).assertTrue();
})
} catch (e) {
expect(null).assertFail();
}
......@@ -137,5 +141,91 @@ describe('rdbStoreTest', function () {
console.log(TAG + "************* testRdbStore0004 end *************");
})
/**
* @tc.name rdb store deleteRdbStore
* @tc.number SUB_DDM_AppDataFWK_JSRDB_RdbStore_0050
* @tc.desc rdb store deleteRdbStore
*/
it('testRdbStore0005', 0, async function (done) {
console.log(TAG + "************* testRdbStore0005 start *************");
let storePromise = dataRdb.getRdbStore(STORE_CONFIG, 2);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
let deletePromise = dataRdb.deleteRdbStore("rdbstore.db")
deletePromise.then(()=>{
console.log(TAG + "deleteRdbStore promise done" + store);
expect(true).assertTrue();
})
} catch (e) {
expect(null).assertFail();
}
}).catch((err) => {
expect(null).assertFail();
})
await storePromise
storePromise = null
done();
console.log(TAG + "************* testRdbStore0005 end *************");
})
/**
* @tc.name rdb store deleteRdbStore
* @tc.number SUB_DDM_AppDataFWK_JSRDB_RdbStore_0060
* @tc.desc rdb store deleteRdbStore
*/
it('testRdbStore0006', 0, async function (done) {
console.log(TAG + "************* testRdbStore0006 start *************");
let storePromise = dataRdb.getRdbStore(STORE_CONFIG, 4);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
let deletePromise = dataRdb.deleteRdbStore("rdbstore.db")
deletePromise.then(()=>{
console.log(TAG + "deleteRdbStore promise done" + store);
expect(true).assertTrue();
})
} catch (e) {
expect(null).assertFail();
}
}).catch((err) => {
expect(null).assertFail();
})
await storePromise
storePromise = null
done();
console.log(TAG + "************* testRdbStore0006 end *************");
})
/**
* @tc.name rdb store deleteRdbStore
* @tc.number SUB_DDM_AppDataFWK_JSRDB_RdbStore_0070
* @tc.desc rdb store deleteRdbStore
*/
it('testRdbStore0007', 0, async function (done) {
console.log(TAG + "************* testRdbStore0007 start *************");
let storePromise = dataRdb.getRdbStore(STORE_CONFIG, 6);
storePromise.then(async (store) => {
try {
await store.executeSql(CREATE_TABLE_TEST);
let deletePromise = dataRdb.deleteRdbStore("rdbstore.db")
deletePromise.then(()=>{
console.log(TAG + "deleteRdbStore promise done" + store);
expect(true).assertTrue();
})
} catch (e) {
expect(null).assertFail();
}
}).catch((err) => {
expect(null).assertFail();
})
await storePromise
storePromise = null
done();
console.log(TAG + "************* testRdbStore0007 end *************");
})
console.log(TAG + "*************Unit Test End*************");
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册