提交 4f5d281b 编写于 作者: Y yanglifeng1217

<yanglifeng5@huawei.com>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 ec3b85fc
...@@ -50,6 +50,8 @@ let Update100 = { "name": "suns", "age": 1 }; ...@@ -50,6 +50,8 @@ let Update100 = { "name": "suns", "age": 1 };
let PredicatesNumber = new dataSharePredicates.DataSharePredicates(); let PredicatesNumber = new dataSharePredicates.DataSharePredicates();
PredicatesNumber.equalTo("age", 1); PredicatesNumber.equalTo("age", 1);
let PredicatesAll = new dataSharePredicates.DataSharePredicates(); let PredicatesAll = new dataSharePredicates.DataSharePredicates();
let predicates = new dataSharePredicates.DataSharePredicates()
predicates.inKeys(["Lisa", "Rose"])
//getColumnIndex //getColumnIndex
const IndexNumber = "age"; const IndexNumber = "age";
...@@ -293,18 +295,22 @@ export default function DataShareCombinationRdb() { ...@@ -293,18 +295,22 @@ export default function DataShareCombinationRdb() {
* @tc.size : MediumTest * @tc.size : MediumTest
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 1 * @tc.level : Level 1
*/ */
it('DataShareNotifyChangeRdb0101', 1, async function (done) { it('DataShareNotifyChangeRdb0101', 1, async function (done) {
try { try {
let Count = 1; let Count = 1;
globalThis.helper.on("dataChange", uri, function (data) { globalThis.helper.on("dataChange", uri, function (err,data) {
if (Count < 4) { if (Count < 4) {
console.info("TestDataShare notifyChange = " + data); console.info("TestDataShare notifyChange err = " + err);
expect(true).assertEqual(data != null); console.info("TestDataShare notifyChange data = " + data);
expect(true).assertEqual(err == null);
expect(true).assertEqual(data == null);
Count = Count + 1; Count = Count + 1;
} else { } else {
console.info("TestDataShare notifyChange = " + data); console.info("TestDataShare notifyChange err = " + err);
expect(true).assertEqual(data != null); console.info("TestDataShare notifyChange data = " + data);
expect(true).assertEqual(err == null);
expect(true).assertEqual(data == null);
globalThis.helper.off("dataChange", uri); globalThis.helper.off("dataChange", uri);
console.info("TestDataShare off"); console.info("TestDataShare off");
done(); done();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册