提交 45a731ec 编写于 作者: F fjr

want

Signed-off-by: Nfjr <fujiarui6@huawei.com>
上级 a387f71f
...@@ -500,9 +500,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -500,9 +500,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of equal("$%$%^$%^","$%$%^$%^")promise * @tc.desc: verify the function of equal("$%$%^$%^","$%$%^$%^")promise
*/ */
it('ACTS_SetWantInfo_0700', 0, async function (done) { it('ACTS_SetWantInfo_0700', 0, async function (done) {
var promise = await wantAgent.equal("$%$%^$%^","$%$%^$%^") wantAgent.equal("$%$%^$%^","$%$%^$%^").then((error, data)=>{
console.info('----equali success!----'+promise) if(error.code) {
expect(promise).assertEqual(undefined); expect(error.code).assertEqual(-1)
}
})
done(); done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_0700====>"); console.debug("====>time out ACTS_SetWantInfo_0700====>");
...@@ -531,9 +533,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -531,9 +533,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of equal({},{})promise * @tc.desc: verify the function of equal({},{})promise
*/ */
it('ACTS_SetWantInfo_0900', 0, async function (done) { it('ACTS_SetWantInfo_0900', 0, async function (done) {
var promise = wantAgent.equal({},{}) wantAgent.equal({},{}).then((error, data)=>{
console.info('----equalk success!----'+promise) if(error.code) {
expect(promise).assertEqual(null); expect(error.code).assertEqual(-1)
}
})
done(); done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_0900====>"); console.debug("====>time out ACTS_SetWantInfo_0900====>");
...@@ -557,14 +561,16 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -557,14 +561,16 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}, time); }, time);
}); });
/* /*
* @tc.number: ACTS_SetWantInfo_2200 * @tc.number: ACTS_SetWantInfo_1100
* @tc.name: equal() * @tc.name: equal()
* @tc.desc: verify the function of equal(100,100)promise * @tc.desc: verify the function of equal(100,100)promise
*/ */
it('ACTS_SetWantInfo_1100', 0, async function (done) { it('ACTS_SetWantInfo_1100', 0, async function (done) {
var promise = await wantAgent.equal(100,100) wantAgent.equal(100,100).then((error, data)=>{
console.info('----equaln success!----'+promise) if(error.code) {
expect(promise).assertEqual(undefined); expect(error.code).assertEqual(-1)
}
})
done(); done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_1100====>"); console.debug("====>time out ACTS_SetWantInfo_1100====>");
...@@ -591,9 +597,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -591,9 +597,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
*/ */
it('ACTS_SetWantInfo_1300', 0, async function (done) { it('ACTS_SetWantInfo_1300', 0, async function (done) {
console.info('----ACTS_SetWantInfo_0300 begin----'); console.info('----ACTS_SetWantInfo_0300 begin----');
var promise = wantAgent.getWantAgent("") wantAgent.getWantAgent("").then((error, data)=>{
console.log("===getWantAgentb==="+promise) if(error.code) {
expect(promise).assertEqual(null); expect(error.code).assertEqual(-1)
}
})
done(); done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_1300====>"); console.debug("====>time out ACTS_SetWantInfo_1300====>");
...@@ -619,9 +627,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -619,9 +627,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getBundleName("")promise * @tc.desc: verify the function of getBundleName("")promise
*/ */
it('ACTS_SetWantInfo_1500', 0, async function (done) { it('ACTS_SetWantInfo_1500', 0, async function (done) {
var promise = await wantAgent.getBundleName("") wantAgent.getBundleName("").then((error, data)=>{
console.info('----getBundleNameb success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done(); done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_1500====>"); console.debug("====>time out ACTS_SetWantInfo_1500====>");
...@@ -647,9 +657,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -647,9 +657,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getUid("")promise * @tc.desc: verify the function of getUid("")promise
*/ */
it('ACTS_SetWantInfo_1700', 0, async function (done) { it('ACTS_SetWantInfo_1700', 0, async function (done) {
var promise =await wantAgent.getUid("") wantAgent.getUid("").then((error, data)=>{
console.info('----getUidb success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_1700====>"); console.debug("====>time out ACTS_SetWantInfo_1700====>");
...@@ -676,9 +688,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -676,9 +688,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWant("")promise * @tc.desc: verify the function of getWant("")promise
*/ */
it('ACTS_SetWantInfo_1900', 0, async function (done) { it('ACTS_SetWantInfo_1900', 0, async function (done) {
var promise = await wantAgent.getWant("") wantAgent.getWant("").then((error, data)=>{
console.info('----getWantb success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_1900====>"); console.debug("====>time out ACTS_SetWantInfo_1900====>");
...@@ -705,9 +719,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -705,9 +719,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWantAgent(100)promises * @tc.desc: verify the function of getWantAgent(100)promises
*/ */
it('ACTS_SetWantInfo_2100', 0, async function (done) { it('ACTS_SetWantInfo_2100', 0, async function (done) {
var promise = wantAgent.getWantAgent(100) wantAgent.getWantAgent(100).then((error, data)=>{
console.log("----getWantAgentb success!----"+promise) if(error.code) {
expect(promise).assertEqual(null) expect(error.code).assertEqual(-1)
}
})
done(); done();
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_2100====>"); console.debug("====>time out ACTS_SetWantInfo_2100====>");
...@@ -734,9 +750,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -734,9 +750,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getBundleName(100)promise * @tc.desc: verify the function of getBundleName(100)promise
*/ */
it('ACTS_SetWantInfo_2300', 0, async function (done) { it('ACTS_SetWantInfo_2300', 0, async function (done) {
var promise =await wantAgent.getBundleName(100) wantAgent.getBundleName(100).then((error, data)=>{
console.info('----getBundleNamed success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_2300====>"); console.debug("====>time out ACTS_SetWantInfo_2300====>");
...@@ -762,9 +780,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -762,9 +780,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getUid(100)promise * @tc.desc: verify the function of getUid(100)promise
*/ */
it('ACTS_SetWantInfo_2500', 0, async function (done) { it('ACTS_SetWantInfo_2500', 0, async function (done) {
var promise =await wantAgent.getUid(100) wantAgent.getUid(100).then((error, data)=>{
console.info('----getUidd success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_2500====>"); console.debug("====>time out ACTS_SetWantInfo_2500====>");
...@@ -791,9 +811,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -791,9 +811,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWant(100)promise * @tc.desc: verify the function of getWant(100)promise
*/ */
it('ACTS_SetWantInfo_2700', 0, async function (done) { it('ACTS_SetWantInfo_2700', 0, async function (done) {
var promise = await wantAgent.getWant(100) wantAgent.getWant(100).then((error, data)=>{
console.info('----getWantd success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWantInfo_2700====>"); console.debug("====>time out ACTS_SetWantInfo_2700====>");
...@@ -842,10 +864,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -842,10 +864,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getBundleName({})promise * @tc.desc: verify the function of getBundleName({})promise
*/ */
it('ACTS_SetWantInfo_3100', 0, async function (done) { it('ACTS_SetWantInfo_3100', 0, async function (done) {
var promise = wantAgent.getBundleName({}) wantAgent.getBundleName({}).then((error, data)=>{
console.info('----getBundleNamef success!----'+promise); if(error.code) {
expect(promise).assertEqual(null) expect(error.code).assertEqual(-1)
done() }
})
done()
}) })
/* /*
* @tc.number: ACTS_SetWantInfo_3200 * @tc.number: ACTS_SetWantInfo_3200
...@@ -864,10 +888,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -864,10 +888,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getUid({})promise * @tc.desc: verify the function of getUid({})promise
*/ */
it('ACTS_SetWantInfo_3300', 0, async function (done) { it('ACTS_SetWantInfo_3300', 0, async function (done) {
var promise = wantAgent.getUid({}) wantAgent.getUid({}).then((error, data)=>{
console.info('----getUidf success!----'+promise); if(error.code) {
expect(promise).assertEqual(null) expect(error.code).assertEqual(-1)
done() }
})
done()
}) })
/* /*
* @tc.number: ACTS_SetWantInfo_3400 * @tc.number: ACTS_SetWantInfo_3400
...@@ -886,10 +912,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -886,10 +912,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of getWant({})promise * @tc.desc: verify the function of getWant({})promise
*/ */
it('ACTS_SetWantInfo_3500', 0, async function (done) { it('ACTS_SetWantInfo_3500', 0, async function (done) {
var promise = wantAgent.getWant({}) wantAgent.getWant({}).then((error, data)=>{
console.info('----getWantf success!----'+promise); if(error.code) {
expect(promise).assertEqual(null) expect(error.code).assertEqual(-1)
done() }
})
done()
}) })
/* /*
* @tc.number: ACTS_SetWantInfo_3600 * @tc.number: ACTS_SetWantInfo_3600
...@@ -908,10 +936,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -908,10 +936,12 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel({})promise * @tc.desc: verify the function of cancel({})promise
*/ */
it('ACTS_SetWantInfo_3700', 0, async function (done) { it('ACTS_SetWantInfo_3700', 0, async function (done) {
var promise = await wantAgent.cancel({}) wantAgent.cancel({}).then((error, data)=>{
console.info('----cancelb success!----'+promise); if(error.code) {
expect(promise).assertEqual(null) expect(error.code).assertEqual(-1)
done() }
})
done()
}) })
/* /*
* @tc.number: ACTS_SetWantInfo_3800 * @tc.number: ACTS_SetWantInfo_3800
...@@ -930,9 +960,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -930,9 +960,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel(100)promise * @tc.desc: verify the function of cancel(100)promise
*/ */
it('ACTS_SetWantInfo_3900', 0, async function (done) { it('ACTS_SetWantInfo_3900', 0, async function (done) {
var promise =await wantAgent.cancel(100) wantAgent.cancel(100).then((error, data)=>{
console.info('----canceld success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
}) })
/* /*
...@@ -952,9 +984,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -952,9 +984,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel("")promise * @tc.desc: verify the function of cancel("")promise
*/ */
it('ACTS_SetWantInfo_4100', 0, async function (done) { it('ACTS_SetWantInfo_4100', 0, async function (done) {
var promise = await wantAgent.cancel("") wantAgent.cancel("").then((error, data)=>{
console.info('----cancelf success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
}) })
/* /*
...@@ -974,9 +1008,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () { ...@@ -974,9 +1008,11 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
* @tc.desc: verify the function of cancel("%^%^%^")promise * @tc.desc: verify the function of cancel("%^%^%^")promise
*/ */
it('ACTS_SetWantInfo_4300', 0, async function (done) { it('ACTS_SetWantInfo_4300', 0, async function (done) {
var promise =await wantAgent.cancel("%^%^%^") wantAgent.cancel("%^%^%^").then((error, data)=>{
console.info('----cancelh success!----'+promise); if(error.code) {
expect(promise).assertEqual(undefined) expect(error.code).assertEqual(-1)
}
})
done() done()
}) })
}) })
......
...@@ -47,7 +47,7 @@ describe('ActsAnsWantAgentFiveTest', function () { ...@@ -47,7 +47,7 @@ describe('ActsAnsWantAgentFiveTest', function () {
} }
}, },
], ],
// operationType: wantAgent.OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0, requestCode: 0,
wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG] wantAgentFlags:[wantAgent.WantAgentFlags.UPDATE_PRESENT_FLAG]
} }
...@@ -75,9 +75,7 @@ describe('ActsAnsWantAgentFiveTest', function () { ...@@ -75,9 +75,7 @@ describe('ActsAnsWantAgentFiveTest', function () {
} }
); );
} else { } else {
console.info('----getWantAgent failed!----'); expect(err.code).assertEqual(-1)
console.info(data);
expect(typeof(data)).assertEqual("object");
} }
done(); done();
......
...@@ -67,15 +67,17 @@ describe('ActsAnsWantAgentFiveProTest', function () { ...@@ -67,15 +67,17 @@ describe('ActsAnsWantAgentFiveProTest', function () {
console.info('----trigger success!----'); console.info('----trigger success!----');
console.info('== trigger data ' + JSON.stringify(data) ); console.info('== trigger data ' + JSON.stringify(data) );
} else { } else {
console.info('----trigger failed!----'); expect(err.code).assertEqual(-1)
console.info('== trigger data ' + JSON.stringify(data) );
} }
done(); done();
} }
); );
done(); done();
} }
); ).catch((err)=>{
expect(err.code).assertEqual(-1)
done()
})
setTimeout(function(){ setTimeout(function(){
console.debug("====>time out ACTS_SetWant_1000====>"); console.debug("====>time out ACTS_SetWant_1000====>");
}, time); }, time);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册