AuthToken.test.js 216.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import account from '@ohos.account.appAccount'
import resmgr from '@ohos.resourceManager'
import featureAbility from '@ohos.ability.featureAbility'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
20
import {AccountErrCode} from './AccountErrCode.test.js'
21 22 23 24 25 26 27 28


const TIMEOUT = 1000;
const EACHTIMEOUT = 500;
const LENGTHLIMIT = 512;
const TOKENLENGTHLIMIT = 1024;
const AUTHTYPELENGTHLIMIT = 1024;
const OWNERLENGTHLIMIT = 1024;
29
const ERR_JS_AUTH_TYPE_NOT_FOUND = 12300107;
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
const OWNERSELF = "com.example.actsaccountoperatetest";
export default function ActsAccountAuthToken() {
    describe('ActsAccountAuthToken', function () {
        function sleep(delay) {
            return new Promise((resolve, reject) => {
                setTimeout(() => {
                    resolve()
                }, delay)
            }).then(() => {
                console.info(`sleep #{time} over ...`)
            })
        }

        beforeAll(async function (done) {
            console.debug("====>beforeAll start====");
            await sleep(TIMEOUT);
            console.debug("====>beforeAll end====");
            done();
        });

        beforeEach(async function (done) {
            console.debug("====>beforeAll enter====");
            await sleep(EACHTIMEOUT);
            done();
        });

        /*
            * @tc.number    : testGetEntriesString101
            * @tc.name      : Use getEntries get the value by mixing the string key
            * @tc.desc      : Mixed strings value can be obtained correctly
            * @tc.size      : MediumTest
            * @tc.type      : Function
            * @tc.level     : Level 1
        */

65
        var valid_owner_name = "com.example.actsaccountOauthtoken";
66 67 68 69 70 71 72 73 74 75 76 77
        it('ActsAccountAuthToken_9100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9100 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_tokenTest_name",(err,)=>{
                console.debug("====>ActsAccountAuthToken_9100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_tokenTest_name","authType1","test_token1",(err)=>{
                    console.debug("====>ActsAccountAuthToken_9100 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthToken("account_tokenTest_name","authType1","test_token2",(err)=>{
                        console.debug("====>ActsAccountAuthToken_9100 setAuthToken err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
78
                        appAccountManager.setAuthTokenVisibility("account_tokenTest_name","authType1",valid_owner_name,true,(err)=>{
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
                            console.debug("====>ActsAccountAuthToken_9100 setAuthTokenVisibility err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            appAccountManager.setAuthToken("account_tokenTest_name","authType2","test_token2",(err)=>{
                                console.debug("====>ActsAccountAuthToken_9100 setAuthToken err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                appAccountManager.getAllAuthTokens("account_tokenTest_name", OWNERSELF,(err,ArrayData)=>{
                                    console.debug("====>ActsAccountAuthToken_9100 getAllAuthTokens err:" + JSON.stringify(err));
                                    console.debug("====>ActsAccountAuthToken_9100 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                                    expect(err).assertEqual(null);
                                    expect(ArrayData.length).assertEqual(2);
                                    appAccountManager.deleteAuthToken("account_tokenTest_name",OWNERSELF,"authType1","test_token2",(err)=>{
                                        console.debug("====>ActsAccountAuthToken_9100 deleteAuthToken err:" + JSON.stringify(err));
                                        expect(err).assertEqual(null);
                                        appAccountManager.getAllAuthTokens("account_tokenTest_name", OWNERSELF,(err,ArrayData)=>{
                                            console.debug("====>ActsAccountAuthToken_9100 getAllAuthTokens err:" + JSON.stringify(err));
                                            console.debug("====>ActsAccountAuthToken_9100 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                                            expect(err).assertEqual(null);
96
                                            expect(ArrayData.length).assertEqual(1);
97 98 99 100 101 102 103 104
                                            appAccountManager.removeAccount("account_tokenTest_name",(err)=>{
                                                console.debug("====>ActsAccountAuthToken_9100 removeAccount err:" + JSON.stringify(err));
                                                expect(err).assertEqual(null);
                                                console.debug("====>ActsAccountAuthToken_9100 end====");
                                                done();
                                                appAccountManager.getAuthToken("account_tokenTest_name",OWNERSELF,"authType",(err,data)=>{
                                                    console.debug("====>ActsAccountAuthToken_9100 getAuthToken err:" + JSON.stringify(err));
                                                    console.debug("====>ActsAccountAuthToken_9100 getAuthToken data:" + data);
105
                                                    expect(err.code).assertEqual(AccountErrCode.ERR_JS_ACCOUNT_NOT_FOUND);
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
                                                    console.debug("====>ActsAccountAuthToken_9100 end====");
                                                    done();
                                                });
                                            });    
                                        }); 
                                    });   
                                });  
                            }); 
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_9000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9000 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_tokenTest_name",(err,)=>{
                console.debug("====>ActsAccountAuthToken_9000 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_tokenTest_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_9000 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_tokenTest_name",OWNERSELF,"authType",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_9000 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_9000 getAuthToken data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("test_token");
135
                        appAccountManager.setAuthTokenVisibility("account_tokenTest_name","authType",valid_owner_name,true,(err)=>{
136 137 138 139 140 141 142
                            console.debug("====>ActsAccountAuthToken_9000 setAuthTokenVisibility err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            appAccountManager.getAuthList("account_tokenTest_name","authType",(err,dataArray)=>{
                                console.debug("====>ActsAccountAuthToken_9000 getAuthList err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_9000 getAuthList dataArray:" + JSON.stringify(dataArray));
                                expect(dataArray.length).assertEqual(1);
143
                                expect(dataArray[0]).assertEqual(valid_owner_name);
144 145 146 147 148 149 150
                                appAccountManager.deleteAuthToken("account_tokenTest_name",OWNERSELF,"authType","test_token",(err)=>{
                                    console.debug("====>ActsAccountAuthToken_9000 deleteAuthToken err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    appAccountManager.getAllAuthTokens("account_tokenTest_name", OWNERSELF,(err,ArrayData)=>{
                                        console.debug("====>ActsAccountAuthToken_9000 getAllAuthTokens err:" + JSON.stringify(err));
                                        console.debug("====>ActsAccountAuthToken_9000 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                                        expect(err).assertEqual(null);
151
                                        expect(ArrayData.length).assertEqual(0);
152 153
                                        appAccountManager.setAuthTokenVisibility("account_tokenTest_name","authType",OWNERSELF,false,(err)=>{
                                            console.debug("====>ActsAccountAuthToken_9000 setAuthTokenVisibility err:" + JSON.stringify(err));
154
                                            expect(err.code).assertEqual(12300002);
155 156 157
                                            appAccountManager.getAuthToken("account_tokenTest_name",OWNERSELF,"authType",(err,data)=>{
                                                console.debug("====>ActsAccountAuthToken_9000 getAuthToken err:" + JSON.stringify(err));
                                                console.debug("====>ActsAccountAuthToken_9000 getAuthToken data:" + data);
158
                                                expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
                                                expect(data).assertEqual(null);
                                                appAccountManager.removeAccount("account_tokenTest_name",(err)=>{
                                                    console.debug("====>ActsAccountAuthToken_9000 removeAccount err:" + JSON.stringify(err));
                                                    expect(err).assertEqual(null);
                                                    console.debug("====>ActsAccountAuthToken_9000 end====");
                                                    done();
                                                });
                                            });    
                                        }); 
                                    });   
                                });  
                            }); 
                        });
                    });
                });
            });
        });



        it('ActsAccountAuthToken_7100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_7100 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7100 createAccount start====");
            appAccountManager.createAccount("account_tokenTest_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_7100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_tokenTest_name","authType1","test_token1",(err)=>{
                    console.debug("====>ActsAccountAuthToken_7100 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthToken("account_tokenTest_name","authType1","test_token2",(err)=>{
                        console.debug("====>ActsAccountAuthToken_7100 setAuthToken err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.setAuthToken("account_tokenTest_name","authType2","test_token2",(err)=>{
                            console.debug("====>ActsAccountAuthToken_7100 setAuthToken err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            appAccountManager.getAllAuthTokens("account_tokenTest_name", OWNERSELF,(err,ArrayData)=>{
                                console.debug("====>ActsAccountAuthToken_7100 getAllAuthTokens err:" + JSON.stringify(err));
                                console.debug("====>ActsAccountAuthToken_7100 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                                expect(err).assertEqual(null);
                                expect(ArrayData.length).assertEqual(2);
                                expect(ArrayData[0].authType).assertEqual("authType1");
                                expect(ArrayData[0].token).assertEqual("test_token2");
                                expect(ArrayData[1].authType).assertEqual("authType2");
                                expect(ArrayData[1].token).assertEqual("test_token2");
                                appAccountManager.deleteAuthToken("account_tokenTest_name",OWNERSELF,"authType1","test_token2",(err)=>{
                                    console.debug("====>ActsAccountAuthToken_7100 deleteAuthToken err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    appAccountManager.getAllAuthTokens("account_tokenTest_name", OWNERSELF,(err,ArrayData)=>{
                                        console.debug("====>ActsAccountAuthToken_7100 getAllAuthTokens err:" + JSON.stringify(err));
                                        console.debug("====>ActsAccountAuthToken_7100 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                                        expect(err).assertEqual(null);
                                        expect(ArrayData.length).assertEqual(1);
                                        expect(ArrayData[0].authType).assertEqual("authType2");
                                        expect(ArrayData[0].token).assertEqual("test_token2");
                                        appAccountManager.removeAccount("account_tokenTest_name",(err)=>{
                                            console.debug("====>ActsAccountAuthToken_7100 removeAccount err:" + JSON.stringify(err));
                                            expect(err).assertEqual(null);
                                            appAccountManager.getAuthToken("account_tokenTest_name",OWNERSELF,"authType",(err,data)=>{
                                                console.debug("====>ActsAccountAuthToken_7100 getAuthToken err:" + JSON.stringify(err));
                                                console.debug("====>ActsAccountAuthToken_7100 getAuthToken data:" + data);
                                                expect(err.code!=0).assertEqual(true);
                                                expect(data).assertEqual(null);
                                                console.debug("====>ActsAccountAuthToken_7100 end====");
                                                done();
                                            });
                                        });
                                    });    
                                }); 
                            });
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_7200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_7200 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_tokenTest_name",(err,)=>{
                console.debug("====>ActsAccountAuthToken_7200 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_tokenTest_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_7200 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_tokenTest_name",OWNERSELF,"authType",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_7200 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_7200 getAuthToken data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("test_token");
                        appAccountManager.getAuthList("account_tokenTest_name","authType",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_7200 getAuthList err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_7200 getAuthList dataArray:" + JSON.stringify(dataArray));
                            expect(dataArray.length).assertEqual(0);
                            appAccountManager.removeAccount("account_tokenTest_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_7200 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_7200 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });

        it('ActsAccountAuthToken_7300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_7300 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7300 createAccount start====");
            appAccountManager.createAccount("account_tokenTest_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_7300 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_tokenTest_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_7300 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_tokenTest_name",OWNERSELF,"authType",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_7300 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_7300 getAuthToken data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("test_token");
                        appAccountManager.checkAuthTokenVisibility("account_tokenTest_name","authType",OWNERSELF,(err,stateBack)=>{
                            console.debug("====>ActsAccountAuthToken_7300 checkAuthTokenVisibility err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_7300 checkAuthTokenVisibility stateBack:" + stateBack);
                            expect(err).assertEqual(null);
                            expect(stateBack).assertEqual(true);
                            appAccountManager.setAuthTokenVisibility("account_tokenTest_name","authType",OWNERSELF,false,(err)=>{
                                console.debug("====>ActsAccountAuthToken_7300 setAuthTokenVisibility err:" + JSON.stringify(err));
289
                                expect(err.code).assertEqual(12300002);
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428
                                appAccountManager.checkAuthTokenVisibility("account_tokenTest_name","authType",OWNERSELF,(err,stateBack)=>{
                                    console.debug("====>ActsAccountAuthToken_7300 checkAuthTokenVisibility err:" + JSON.stringify(err));
                                    console.debug("====>ActsAccountAuthToken_7300 checkAuthTokenVisibility stateBack:" + stateBack);
                                    expect(err).assertEqual(null);
                                    expect(stateBack).assertEqual(true);
                                    appAccountManager.deleteAuthToken("account_tokenTest_name",OWNERSELF,"authType","test_token",(err)=>{
                                        console.debug("====>ActsAccountAuthToken_7300 deleteAuthToken err:" + JSON.stringify(err));
                                        expect(err).assertEqual(null);
                                        appAccountManager.removeAccount("account_tokenTest_name",(err)=>{
                                            console.debug("====>ActsAccountAuthToken_7300 removeAccount err:" + JSON.stringify(err));
                                            expect(err).assertEqual(null);
                                            console.debug("====>ActsAccountAuthToken_7300 end====");
                                            done();
                                        });
                                    });
                                });
                            });
                        });
                    });
                });
            });
        });

        it('ActsAccountAuthToken_7400', 0, async function (done) {
            var limitAuthType = '';
            for(var i = 0;i < AUTHTYPELENGTHLIMIT + 1; i++){
                limitAuthType += 'c';
            }
            console.debug("====>ActsAccountAuthToken_7400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7400 createAccount start====");
            appAccountManager.createAccount("account_callback_authType_limit",(err)=>{
                console.debug("====>ActsAccountAuthToken_7400 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_authType_limit","authType","callback_authType_limit_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_7400 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_authType_limit",OWNERSELF,limitAuthType,"callback_authType_limit_token",(err)=>{
                        console.debug("====>ActsAccountAuthToken_7400 getAuthToken err:" + JSON.stringify(err));
                        expect(err.code!=0).assertEqual(true);
                        appAccountManager.removeAccount("account_callback_authType_limit",(err)=>{
                            console.debug("====>ActsAccountAuthToken_7400 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_7400 end====");
                            done();
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_7500', 0, async function (done) {
            var limitAuthType = '';
            for(var i = 0;i < AUTHTYPELENGTHLIMIT + 1; i++){
                limitAuthType += 'c';
            }
            console.debug("====>ActsAccountAuthToken_7500 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7500 createAccount start====");
            await appAccountManager.createAccount("account_promise_authType_limit");
            console.debug("====>ActsAccountAuthToken_7500 getAuthToken start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_authType_limit",OWNERSELF,limitAuthType,"promise_authType_limit_token");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_7500 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_7500 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_authType_limit");
                console.debug("====>ActsAccountAuthToken_7500 end====");
                done();
            }
        });



        it('ActsAccountAuthToken_7600', 0, async function (done) {
            var limitAuthType = '';
            for(var i = 0;i < AUTHTYPELENGTHLIMIT; i++){
                limitAuthType += 'c';
            }
            console.debug("====>ActsAccountAuthToken_7600 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7600 createAccount start====");
            appAccountManager.createAccount("account_callback_authType_limit",(err)=>{
                console.debug("====>ActsAccountAuthToken_7600 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_authType_limit",limitAuthType,"callback_authType_limit_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_7600 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_authType_limit",OWNERSELF,limitAuthType,"callback_authType_limit_token",(err)=>{
                        console.debug("====>ActsAccountAuthToken_7600 getAuthToken err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.removeAccount("account_callback_authType_limit",(err)=>{
                            console.debug("====>ActsAccountAuthToken_7600 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_7600 end====");
                            done();
                        });
                    });
                });
            });
        });

        it('ActsAccountAuthToken_7700', 0, async function (done) {
            var limitAuthType = '';
            for(var i = 0;i < AUTHTYPELENGTHLIMIT; i++){
                limitAuthType += 'c';
            }
            console.debug("====>ActsAccountAuthToken_7700 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7700 createAccount start====");
            await appAccountManager.createAccount("account_promise_authType_limit")
            console.debug("====>ActsAccountAuthToken_7700 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_authType_limit",limitAuthType,"promise_authType_limit_token");
            console.debug("====>ActsAccountAuthToken_7700 deleteAuthToken start====");
            await appAccountManager.deleteAuthToken("account_promise_authType_limit",OWNERSELF,limitAuthType,"promise_authType_limit_token")
            console.debug("====>ActsAccountAuthToken_7700 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_authType_limit")
            console.debug("====>ActsAccountAuthToken_7700 end====");
            done();

        });


        
        it('ActsAccountAuthToken_7800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_7800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7800 createAccount start====");
            appAccountManager.createAccount("account_callback_empty_authType",(err)=>{
                console.debug("====>ActsAccountAuthToken_7800 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_empty_authType","authType","callback_empty_authType_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_7800 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_empty_authType",OWNERSELF,"","callback_empty_authType_token",(err)=>{
                        console.debug("====>ActsAccountAuthToken_7800 deleteAuthToken err:" + JSON.stringify(err));
429
                        expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453
                        appAccountManager.getAuthToken("account_callback_empty_authType",OWNERSELF,"authType",(err,data)=>{
                            console.debug("====>ActsAccountAuthToken_7800 getAuthToken err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_7800 getAuthToken data:" + data);
                            expect(err).assertEqual(null);
                            expect(data).assertEqual("callback_empty_authType_token");
                            appAccountManager.removeAccount("account_callback_empty_authType",(err)=>{
                                console.debug("====>ActsAccountAuthToken_7800 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_7800 end====");
                                done();
                            });
                        });
                    });
                });
            });
        });

        it('ActsAccountAuthToken_7900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_7900 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7900 createAccount start====");
            await appAccountManager.createAccount("account_promise_empty_authType");
            console.debug("====>ActsAccountAuthToken_7900 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_empty_authType","authType","promise_empty_authType_token");
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
            
            try {
                console.debug("====>ActsAccountAuthToken_7900 deleteAuthToken start====");
                await appAccountManager.deleteAuthToken("account_promise_empty_authType",OWNERSELF,"","promise_empty_authType_token");
            } catch(err) {
                console.debug("====>ActsAccountAuthToken_7900 deleteAuthToken err:" + JSON.stringify(err));
                expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);
                console.debug("====>ActsAccountAuthToken_7900 getAuthToken start====");
                var data = await appAccountManager.getAuthToken("account_promise_empty_authType",OWNERSELF,"authType");
                expect(data).assertEqual("promise_empty_authType_token");
                console.debug("====>ActsAccountAuthToken_7900 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_empty_authType");
                console.debug("====>ActsAccountAuthToken_7900 end====");
                done();

            }
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492
        });


        it('ActsAccountAuthToken_8000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_8000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8000 createAccount start====");
            appAccountManager.createAccount("account_callback_setSameAuthType",(err)=>{
                console.debug("====>ActsAccountAuthToken_8000 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_setSameAuthType","authType","callback_setSameAuthType_token1",(err)=>{
                    console.debug("====>ActsAccountAuthToken_8000 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthToken("account_callback_setSameAuthType","authType","callback_setSameAuthType_token2",(err)=>{
                        console.debug("====>ActsAccountAuthToken_8000 setAuthToken err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthToken("account_callback_setSameAuthType",OWNERSELF,"authType",(err,data)=>{
                            console.debug("====>ActsAccountAuthToken_8000 getAuthToken err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_8000 getAuthToken data:" + data);
                            expect(err).assertEqual(null);
                            expect(data).assertEqual("callback_setSameAuthType_token2");
                            appAccountManager.deleteAuthToken("account_callback_setSameAuthType",OWNERSELF,"authType","callback_setSameAuthType_token1",(err,data)=>{
                                console.debug("====>ActsAccountAuthToken_8000 deleteAuthToken err:" + JSON.stringify(err));
493
                                expect(err).assertEqual(null);
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343
                                appAccountManager.removeAccount("account_callback_setSameAuthType",(err)=>{
                                    console.debug("====>ActsAccountAuthToken_8000 removeAccount err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    console.debug("====>ActsAccountAuthToken_8000 end====");
                                    done();
                                }); 
                            }); 
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_8100', 0, async function (done) {
            var limitName = '';
            for(var i = 0;i < LENGTHLIMIT + 1; i++){
                limitName += 'c';
            }
            console.debug("====>ActsAccountAuthToken_8100 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8100 getAllAuthTokens start====");
            appAccountManager.getAllAuthTokens(limitName, OWNERSELF).then((ArrayData)=>{
                console.debug("====>ActsAccountAuthToken_8100 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));           
                expect(ArrayData.length).assertEqual(0);
                console.debug("====>ActsAccountAuthToken_8100 ====");
                done();
            }).catch((err)=>{
                expect(err.code!=0).assertEqual(true);
                done();
            })
        });
        
        it('ActsAccountAuthToken_8200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_8200 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8200 getAllAuthTokens start====");
            appAccountManager.getAllAuthTokens("", OWNERSELF,(err,ArrayData)=>{
                console.debug("====>ActsAccountAuthToken_8200 getAllAuthTokens err:" + JSON.stringify(err));
                console.debug("====>ActsAccountAuthToken_8200 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_8200 ====");
                done();
            });
        });

        it('ActsAccountAuthToken_8300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_8300 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8300 getAllAuthTokens start====");
            appAccountManager.getAllAuthTokens("acount_no_setToken", OWNERSELF,(err,ArrayData)=>{
                console.debug("====>ActsAccountAuthToken_8300 getAllAuthTokens err:" + JSON.stringify(err));
                console.debug("====>ActsAccountAuthToken_8300 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                expect(err.code!=0).assertEqual(true);
                expect(ArrayData).assertEqual(null);
                console.debug("====>ActsAccountAuthToken_8300 end====");
                done();
            });
        });



        it('ActsAccountAuthToken_8400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_8400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8400 createAccount start====");
            appAccountManager.createAccount("acount_no_setToken",(err)=>{
                console.debug("====>ActsAccountAuthToken_8400 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAllAuthTokens("acount_no_setToken", OWNERSELF,(err,ArrayData)=>{
                    console.debug("====>ActsAccountAuthToken_8400 getAllAuthTokens err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_8400 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                    expect(err).assertEqual(null);
                    expect(ArrayData.length).assertEqual(0);
                    appAccountManager.removeAccount("acount_no_setToken",(err)=>{
                        console.debug("====>ActsAccountAuthToken_8400 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_8400 end====");
                        done();
                    });
                });
            });
        });



        it('ActsAccountAuthToken_8500', 0, async function (done) {
            var limitName = '';
            for(var i = 0;i < LENGTHLIMIT; i++){
                limitName += 'c';
            }
            console.debug("====>ActsAccountAuthToken_8500 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8500 createAccount start====");
            appAccountManager.createAccount(limitName,(err)=>{
                console.debug("====>ActsAccountAuthToken_8500 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken(limitName,"authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_8500 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAllAuthTokens(limitName, OWNERSELF,(err,ArrayData)=>{
                        console.debug("====>ActsAccountAuthToken_8500 getAllAuthTokens err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_8500 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                        expect(err).assertEqual(null);
                        expect(ArrayData.length).assertEqual(1);
                        expect(ArrayData[0].authType).assertEqual("authType");
                        expect(ArrayData[0].token).assertEqual("test_token");
                        appAccountManager.removeAccount(limitName,(err)=>{
                            console.debug("====>ActsAccountAuthToken_8500 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_8500 end====");
                            done();
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_8600', 0, async function (done) {
            var limitOwner = '';
            for(var i = 0;i < OWNERLENGTHLIMIT + 1; i++){
                limitOwner += 'c';
            }
            console.debug("====>ActsAccountAuthToken_8600 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8600 createAccount start====");
            appAccountManager.createAccount("account_callback_getAllAuthTokens_test",(err)=>{
                console.debug("====>ActsAccountAuthToken_8600 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAllAuthTokens("account_callback_getAllAuthTokens_test",limitOwner,(err,ArrayData)=>{
                    console.debug("====>ActsAccountAuthToken_8600 getAllAuthTokens err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_8600 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                    expect(err.code!=0).assertEqual(true);
                    expect(ArrayData).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_getAllAuthTokens_test",(err)=>{
                        console.debug("====>ActsAccountAuthToken_8600 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_8600 end====");
                        done();
                    });
                });
            });
        });
        

        it('ActsAccountAuthToken_8700', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_8700 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8700 createAccount start====");
            appAccountManager.createAccount("account_callback_getAllAuthTokens_test",(err)=>{
                console.debug("====>ActsAccountAuthToken_8700 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAllAuthTokens("account_callback_getAllAuthTokens_test","",(err,ArrayData)=>{
                    console.debug("====>ActsAccountAuthToken_8700 getAllAuthTokens err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_8700 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                    expect(err.code!=0).assertEqual(true);
                    expect(ArrayData).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_getAllAuthTokens_test",(err)=>{
                        console.debug("====>ActsAccountAuthToken_8700 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_8700 end====");
                        done();
                    });
                });
            });
        });

        
        it('ActsAccountAuthToken_8800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_8800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8800 createAccount start====");
            appAccountManager.createAccount("account_callback_getAllAuthTokens_test",(err)=>{
                console.debug("====>ActsAccountAuthToken_8800 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAllAuthTokens("account_callback_getAllAuthTokens_test","invalid_owner",(err,ArrayData)=>{
                    console.debug("====>ActsAccountAuthToken_8800 getAllAuthTokens err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_8800 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                    expect(err.code!=0).assertEqual(true);
                    expect(ArrayData).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_getAllAuthTokens_test",(err)=>{
                        console.debug("====>ActsAccountAuthToken_8800 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_8800 end====");
                        done();
                    });
                });
            });
        });

        it('ActsAccountAuthToken_8900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_8900 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_8900 createAccount start====");
            appAccountManager.createAccount("account_callback_getAllAuthTokens_test",(err)=>{
                console.debug("====>ActsAccountAuthToken_8900 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAllAuthTokens("account_callback_getAllAuthTokens_test"," ",(err,ArrayData)=>{
                    console.debug("====>ActsAccountAuthToken_8900 getAllAuthTokens err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_8900 getAllAuthTokens ArrayData:" + JSON.stringify(ArrayData));
                    expect(err.code!=0).assertEqual(true);
                    expect(ArrayData).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_getAllAuthTokens_test",(err)=>{
                        console.debug("====>ActsAccountAuthToken_8900 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_8900 end====");
                        done();
                    });
                });
            });
        });




        it('ActsAccountAuthToken_0100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0100 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0100 createAccount start====");
            appAccountManager.createAccount("account_callback_normal",(err)=>{
                console.debug("====>ActsAccountAuthToken_0100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_normal","authType","callback_normal_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_0100 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_normal",OWNERSELF,"authType",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_0100 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_0100 getAuthToken data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("callback_normal_token");
                        appAccountManager.checkAuthTokenVisibility("account_callback_normal","authType",OWNERSELF,(err,stateBack)=>{
                            console.debug("====>ActsAccountAuthToken_0100 checkAuthTokenVisibility err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_0100 checkAuthTokenVisibility stateBack:" + stateBack);
                            expect(err).assertEqual(null);
                            expect(stateBack).assertEqual(true);
                            appAccountManager.deleteAuthToken("account_callback_normal",OWNERSELF,"authType","callback_normal_token",(err)=>{
                                console.debug("====>ActsAccountAuthToken_0100 deleteAuthToken err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                appAccountManager.removeAccount("account_callback_normal",(err)=>{
                                    console.debug("====>ActsAccountAuthToken_0100 removeAccount err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    console.debug("====>ActsAccountAuthToken_0100 end====");
                                    done();
                                });
                            });
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_0200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0200 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0200 createAccount start====");
            await appAccountManager.createAccount("account_promise_normal");
            console.debug("====>ActsAccountAuthToken_0200 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_normal","authType","promise_normal_token");
            console.debug("====>ActsAccountAuthToken_0200 getAuthToken start====");
            var data1 = await appAccountManager.getAuthToken("account_promise_normal",OWNERSELF,"authType");
            console.debug("====>getAuthToken ActsAccountAuthToken_0200 data:" + data1);
            expect(data1).assertEqual("promise_normal_token");
            console.debug("====>ActsAccountAuthToken_0200 checkAuthTokenVisibility start====");
            var state = await appAccountManager.checkAuthTokenVisibility("account_promise_normal","authType",OWNERSELF);
            console.debug("====>checkAuthTokenVisibility ActsAccountAuthToken_0200 state:" + state);
            expect(state).assertEqual(true);
            console.debug("====>ActsAccountAuthToken_0200 deleteAuthToken start====");
            await appAccountManager.deleteAuthToken("account_promise_normal",OWNERSELF,"authType","promise_normal_token");
            console.debug("====>ActsAccountAuthToken_0200 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_normal");
            console.debug("====>ActsAccountAuthToken_0200 end====");
            done();
        });




        it('ActsAccountAuthToken_0300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0300 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0300 getAuthToken start====");
            appAccountManager.createAccount("account_callback_noSetToken",(err)=>{
                console.debug("====>ActsAccountAuthToken_0300 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAuthToken("account_callback_noSetToken",OWNERSELF,"authType",(err,data)=>{
                    console.debug("====>ActsAccountAuthToken_0300 getAuthToken err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_0300 getAuthToken data:" + data);
                    expect(err.code!=0).assertEqual(true);
                    expect(data).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_noSetToken",(err)=>{
                        console.debug("====>ActsAccountAuthToken_0300 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_0300 end====");
                        done();
                    });
                });
            });
        });

        it('ActsAccountAuthToken_0400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0400 createAccount start====");
            await appAccountManager.createAccount("account_promise_noSetToken");
            console.debug("====>ActsAccountAuthToken_0400 getAuthToken start====");
            try{
                await appAccountManager.getAuthToken("account_promise_noSetToken",OWNERSELF,"authType");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_0400 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_0400 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_noSetToken");
                console.debug("====>ActsAccountAuthToken_0400 end====");
                done();
            }
        });


        it('ActsAccountAuthToken_0500', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0500 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0500 getAuthToken start====");
            appAccountManager.getAuthToken("noAdd_account_callback",OWNERSELF,"authType",(err,data)=>{
                console.debug("====>ActsAccountAuthToken_0500 getAuthToken err:" + JSON.stringify(err));
                console.debug("====>ActsAccountAuthToken_0500 getAuthToken data:" + data);
                expect(err.code!=0).assertEqual(true);
                expect(data).assertEqual(null);
                done();
            });
        });

        it('ActsAccountAuthToken_0600', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0600 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0600 getAuthToken start====");
            try{
                await appAccountManager.getAuthToken("noAdd_account_promise",OWNERSELF,"authType");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_0600 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_0600 end====");
                done();
            }
        });


        it('ActsAccountAuthToken_0700', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0700 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0700 createAccount start====");
            appAccountManager.createAccount("account_callback_setSameAuthType",(err)=>{
                console.debug("====>ActsAccountAuthToken_0700 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_setSameAuthType","authType","callback_setSameAuthType_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_0700 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthToken("account_callback_setSameAuthType","authType","callback_setSameAuthType_token",(err)=>{
                        console.debug("====>ActsAccountAuthToken_0700 setAuthToken err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthToken("account_callback_setSameAuthType",OWNERSELF,"authType",(err,data)=>{
                            console.debug("====>ActsAccountAuthToken_0700 getAuthToken err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_0700 getAuthToken data:" + data);
                            expect(err).assertEqual(null);
                            expect(data).assertEqual("callback_setSameAuthType_token");
                            appAccountManager.setAuthToken("account_callback_setSameAuthType","authType","callback_setSameAuthType_DiffToken",(err)=>{
                                console.debug("====>ActsAccountAuthToken_0700 setAuthToken err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                appAccountManager.getAuthToken("account_callback_setSameAuthType",OWNERSELF,"authType",(err,data)=>{
                                    console.debug("====>ActsAccountAuthToken_0700 getAuthToken err:" + JSON.stringify(err));
                                    console.debug("====>ActsAccountAuthToken_0700 getAuthToken data:" + data);
                                    expect(err).assertEqual(null);
                                    expect(data).assertEqual("callback_setSameAuthType_DiffToken");
                                    appAccountManager.removeAccount("account_callback_setSameAuthType",(err)=>{
                                        console.debug("====>ActsAccountAuthToken_0700 removeAccount err:" + JSON.stringify(err));
                                        expect(err).assertEqual(null);
                                        console.debug("====>ActsAccountAuthToken_0700 end====");
                                        done();
                                    });
                                });
                            });   
                        });
                    });
                });
            });
        });




        it('ActsAccountAuthToken_0800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_0800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_0800 createAccount start====");
            await appAccountManager.createAccount("account_promise_setSameAuthType");
            console.debug("====>ActsAccountAuthToken_0800 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_setSameAuthType","authType","promise_setSameAuthType_token");
            console.debug("====>ActsAccountAuthToken_0800 repeat setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_setSameAuthType","authType","promise_setSameAuthType_token");
            var data1 = await appAccountManager.getAuthToken("account_promise_setSameAuthType",OWNERSELF,"authType");
            console.debug("====>getAuthToken ActsAccountAuthToken_0800 data:" + data1);
            expect(data1).assertEqual("promise_setSameAuthType_token");
            console.debug("====>ActsAccountAuthToken_0800 repeat set diffToken setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_setSameAuthType","authType","promise_setSameAuthType_DiffToken");
            var data2 = await appAccountManager.getAuthToken("account_promise_setSameAuthType",OWNERSELF,"authType");
            console.debug("====>getAuthToken ActsAccountAuthToken_0800 data:" + data2);
            expect(data2).assertEqual("promise_setSameAuthType_DiffToken");
            console.debug("====>ActsAccountAuthToken_0800 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_setSameAuthType");
            console.debug("====>ActsAccountAuthToken_0800 end====");
            done();
        });



        it('ActsAccountAuthToken_0900', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_0900 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_setDiff", (err)=>{
                console.debug("====>createAccount ActsAccountAuthToken_0900 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_setDiff","authType1","callback_setDiff_token1",(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_0900 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthToken("account_callback_setDiff","authType2","callback_setDiff_token2",(err)=>{
                        console.debug("====>getAuthToken ActsAccountAuthToken_0900 err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthToken("account_callback_setDiff",OWNERSELF,"authType1", (err, data)=>{
                            console.debug("====>getAuthToken ActsAccountAuthToken_0900 err:" + JSON.stringify(err));
                            console.debug("====>getAuthToken ActsAccountAuthToken_0900 data:" + data);
                            expect(err).assertEqual(null);
                            expect(data).assertEqual("callback_setDiff_token1");
                            appAccountManager.getAuthToken("account_callback_setDiff",OWNERSELF,"authType2", (err, data)=>{
                                console.debug("====>getAuthToken ActsAccountAuthToken_0900 err:" + JSON.stringify(err));
                                console.debug("====>getAuthToken ActsAccountAuthToken_0900 data:" + data);
                                expect(err).assertEqual(null);
                                expect(data).assertEqual("callback_setDiff_token2");
                                appAccountManager.removeAccount("account_callback_setDiff", (err)=>{
                                    console.debug("====>removeAccount ActsAccountAuthToken_0900 err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    console.debug("====>ActsAccountAuthToken_0900 end====");
                                    done();
                                });   
                            });    
                        });
                    });
                });    
            });
        });



        it('ActsAccountAuthToken_1000', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_1000 createAccount start====");
            await appAccountManager.createAccount("account_promise_setDiff");
            console.debug("====>setAuthToken ActsAccountAuthToken_1000 start====");
            await appAccountManager.setAuthToken("account_promise_setDiff","aythType1","promise_setDiff_token1");
            console.debug("====>setAuthToken ActsAccountAuthToken_1000 start====");
            await appAccountManager.setAuthToken("account_promise_setDiff","aythType2","promise_setDiff_token2");

            console.debug("====>getAuthToken ActsAccountAuthToken_1000 start====");
            var data1 = await appAccountManager.getAuthToken("account_promise_setDiff",OWNERSELF,"aythType1");
            console.debug("====>getAuthToken getOld ActsAccountAuthToken_1000 data:" + data1);
            expect(data1).assertEqual("promise_setDiff_token1");
            console.debug("====>getAuthToken ActsAccountAuthToken_1000 start====");
            var data2 = await appAccountManager.getAuthToken("account_promise_setDiff",OWNERSELF,"aythType2");
            console.debug("====>getAuthToken getNew ActsAccountAuthToken_1000 data:" + data2);
            expect(data2).assertEqual("promise_setDiff_token2");

            console.debug("====>deleteAuthToken ActsAccountAuthToken_1000 start====");
            await appAccountManager.deleteAuthToken("account_promise_setDiff",OWNERSELF,"aythType1","promise_setDiff_token1");
            console.debug("====>deleteAuthToken ActsAccountAuthToken_1000 start====");
            await appAccountManager.deleteAuthToken("account_promise_setDiff",OWNERSELF,"aythType2","promise_setDiff_token2");
            console.debug("====>ActsAccountAuthToken_1000 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_setDiff");
            console.debug("====>ActsAccountAuthToken_1000 end====");
            done();
        });



        it('ActsAccountAuthToken_1100', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1100 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_setDeleteGet", (err)=>{
                console.debug("====>createAccount ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_setDeleteGet","old_authType","callback_setDeleteGet_token",(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthToken("account_callback_setDeleteGet","new_authType","callback_setDeleteGet_token",(err)=>{
                        console.debug("====>getAuthToken ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthToken("account_callback_setDeleteGet",OWNERSELF,"old_authType", (err, data)=>{
                            console.debug("====>getAuthToken getOld ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                            console.debug("====>getAuthToken getOld ActsAccountAuthToken_1100 data:" + data);
                            expect(err).assertEqual(null);
                            expect(data).assertEqual("callback_setDeleteGet_token");
                            appAccountManager.getAuthToken("account_callback_setDeleteGet",OWNERSELF,"new_authType", (err, data)=>{
                                console.debug("====>getAuthToken getNew ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                console.debug("====>getAuthToken getNew ActsAccountAuthToken_1100 data:" + data);
                                expect(err).assertEqual(null);
                                expect(data).assertEqual("callback_setDeleteGet_token");
                                appAccountManager.deleteAuthToken("account_callback_setDeleteGet",OWNERSELF,"old_authType","callback_setDeleteGet_token",(err)=>{
                                    console.debug("====>deleteAuthToken deleteOld ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                    appAccountManager.getAuthToken("account_callback_setDeleteGet",OWNERSELF,"old_authType", (err, data)=>{
                                        console.debug("====>getAuthToken getOld ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                        console.debug("====>getAuthToken getOld ActsAccountAuthToken_1100 data:" + data);
                                        expect(err.code!=0).assertEqual(true);
                                        expect(data).assertEqual(null);
                                        appAccountManager.getAuthToken("account_callback_setDeleteGet",OWNERSELF,"new_authType", (err, data)=>{
                                            console.debug("====>getAuthToken getNew ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                            console.debug("====>getAuthToken getNew ActsAccountAuthToken_1100 data:" + data);
                                            expect(err).assertEqual(null);
                                            expect(data).assertEqual("callback_setDeleteGet_token");
                                            appAccountManager.deleteAuthToken("account_callback_setDeleteGet",OWNERSELF,"new_authType","callback_setDeleteGet_token",(err)=>{
                                                console.debug("====>deleteAuthToken deleteNew ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                                appAccountManager.getAuthToken("account_callback_setDeleteGet",OWNERSELF,"old_authType", (err, data)=>{
                                                    console.debug("====>getAuthToken getOld ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                                    console.debug("====>getAuthToken getOld ActsAccountAuthToken_1100 data:" + data);
                                                    expect(err.code!=0).assertEqual(true);
                                                    expect(data).assertEqual(null);
                                                    appAccountManager.getAuthToken("account_callback_setDeleteGet",OWNERSELF,"new_authType", (err, data)=>{
                                                        console.debug("====>getAuthToken getNew ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                                        console.debug("====>getAuthToken getNew ActsAccountAuthToken_1100 data:" + data);
                                                        expect(err.code!=0).assertEqual(true);
                                                        expect(data).assertEqual(null);
                                                        appAccountManager.removeAccount("account_callback_setDeleteGet", (err)=>{
                                                            console.debug("====>removeAccount ActsAccountAuthToken_1100 err:" + JSON.stringify(err));
                                                            expect(err).assertEqual(null);
                                                            console.debug("====>ActsAccountAuthToken_1100 end====");
                                                            done();
                                                        });   
                                                    });
                                                })
                                            });
                                        });
                                    });
                                });
                            });    
                        });
                    });
                });    
            });
        });


        it('ActsAccountAuthToken_1200', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1200 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_1200 createAccount start====");
            await appAccountManager.createAccount("account_promise_setDeleteGet");

            console.debug("====>setAuthToken setOld ActsAccountAuthToken_1200 start====");
            await appAccountManager.setAuthToken("account_promise_setDeleteGet","old_authType","promise_setDeleteGet_token");
            console.debug("====>setAuthToken setNew ActsAccountAuthToken_1200 start====");
            await appAccountManager.setAuthToken("account_promise_setDeleteGet","new_authType","promise_setDeleteGet_token");

            console.debug("====>getAuthToken ActsAccountAuthToken_1200 start====");
            var data1BeforeDel = await appAccountManager.getAuthToken("account_promise_setDeleteGet",OWNERSELF,"old_authType");
            console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 data1BeforeDel:" + data1BeforeDel);
            expect(data1BeforeDel).assertEqual("promise_setDeleteGet_token");
            console.debug("====>getAuthToken ActsAccountAuthToken_1200 start====");
            var data2BeforeDel = await appAccountManager.getAuthToken("account_promise_setDeleteGet",OWNERSELF,"new_authType");
            console.debug("====>getAuthToken getNew ActsAccountAuthToken_1200 data2BeforeDel:" + data2BeforeDel);
            expect(data2BeforeDel).assertEqual("promise_setDeleteGet_token");

            console.debug("====>deleteAuthToken deleteOld ActsAccountAuthToken_1200 start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_setDeleteGet",OWNERSELF,"old_authType","promise_setDeleteGet_token");
            }
            catch(err){
                console.debug("====>deleteAuthToken ActsAccountAuthToken_1200 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
            }

            console.debug("====>getAuthToken ActsAccountAuthToken_1200 start====");
            try{
                var data1AfterDel = await appAccountManager.getAuthToken("account_promise_setDeleteGet",OWNERSELF,"old_authType",);
                console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 data1_AfterDel:" + data1AfterDel);
                expect().assertFail();
            }
            catch(err){
                console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);                
            }
            console.debug("====>getAuthToken ActsAccountAuthToken_1200 start====");
            try{
                var data2AfterDel = await appAccountManager.getAuthToken("account_promise_setDeleteGet",OWNERSELF,"new_authType",);
                console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 data2_AfterDel:" + data2AfterDel);
                expect(data2AfterDel).assertEqual("promise_setDeleteGet_token");
            }
            catch(err){
                console.debug("====>getAuthToken getNew ActsAccountAuthToken_1200 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
            }
            console.debug("====>deleteAuthToken deleteNew ActsAccountAuthToken_1200 start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_setDeleteGet",OWNERSELF,"new_authType","promise_setDeleteGet_token");
            }
            catch(err){
                console.debug("====>deleteAuthToken ActsAccountAuthToken_1200 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
            }

            console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 start====");
            try{
                var data1AgainDel = await appAccountManager.getAuthToken("account_promise_setDeleteGet",OWNERSELF,"old_authType",);
                console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 data1_AgainDel:" + data1AgainDel);
                expect().assertFail();
            }
            catch(err){
                console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
            }
            console.debug("====>getAuthToken getNew ActsAccountAuthToken_1200 start====");
            try{
                var data2AgainDel = await appAccountManager.getAuthToken("account_promise_setDeleteGet",OWNERSELF,"new_authType",);
                console.debug("====>getAuthToken getOld ActsAccountAuthToken_1200 data2_AgainDel:" + data2AgainDel);
                expect().assertFail();
            }
            catch(err){
                console.debug("====>getAuthToken getNew ActsAccountAuthToken_1200 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
            }
            await appAccountManager.removeAccount("account_promise_setDeleteGet");
            console.debug("====>ActsAccountAuthToken_1200 end====");
            done();

        });


        it('ActsAccountAuthToken_1300', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1300 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_setDeleteGet", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_1300 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_setDeleteGet","authType","account_callback_setDeleteGet_token",(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_1300 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_setDeleteGet",OWNERSELF,"authType","account_callback_setDeleteGet_token",(err)=>{
                        console.debug("====>deleteAuthToken ActsAccountAuthToken_1300 err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthToken("account_callback_setDeleteGet",OWNERSELF,"authType", (err, data)=>{
                            console.debug("====>getAuthToken ActsAccountAuthToken_1300 err:" + JSON.stringify(err));
                            console.debug("====>getAuthToken ActsAccountAuthToken_1300 data:" + data);
                            expect(err.code != 0).assertEqual(true);
                            expect(data).assertEqual(null);
                            appAccountManager.removeAccount("account_callback_setDeleteGet", (err)=>{
                                console.debug("====>removeAccount ActsAccountAuthToken_1300 err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_1300 end====");
                                done();
                            });
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_1400', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_1400 createAccount start====");
            await appAccountManager.createAccount("account_promise_setDeleteGet");
            console.debug("====>setAuthToken ActsAccountAuthToken_1400 start====");
            await appAccountManager.setAuthToken("account_promise_setDeleteGet","authType","promise_setDeleteGet_token");
            console.debug("====>deleteAuthToken ActsAccountAuthToken_1400 start====");
            await appAccountManager.deleteAuthToken("account_promise_setDeleteGet",OWNERSELF,"authType","promise_setDeleteGet_token");
            console.debug("====>getAuthToken ActsAccountAuthToken_1400 start====");
            try{
                var data = await appAccountManager.getAuthToken("account_promise_setDeleteGet",OWNERSELF,"authType");
            }
            catch(err){
                console.debug("====>getAuthToken ActsAccountAuthToken_1400 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>getAuthToken ActsAccountAuthToken_1400 data:" + data);
                console.debug("====>ActsAccountAuthToken_1400 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_setDeleteGet");
                console.debug("====>ActsAccountAuthToken_1400 end====");
                done();
            }
        });


        it('ActsAccountAuthToken_1500', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1500 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.setAuthToken("account_callback_accountNotExit","authType","account_callback_accountNotExit_token", (err)=>{
                console.debug("====>setAuthToken ActsAccountAuthToken_1500 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_1500 end====");
                done();
            });
        });

        it('ActsAccountAuthToken_1600', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1600 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>setAuthToken ActsAccountAuthToken_1600 start====");
            try{
                await appAccountManager.setAuthToken("account_promise_accountNotExit","authType","account_promise_accountNotExit_token");
            }
            catch(err){
                console.debug("====>setAuthToken ActsAccountAuthToken_1600 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_1600 end====");
                done();
            }
        });



        it('ActsAccountAuthToken_1700', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1700 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.deleteAuthToken("account_callback_accountNotExit",OWNERSELF,"authType","account_callback_accountNotExit_token", (err)=>{
                console.debug("====>deleteAuthToken ActsAccountAuthToken_1700 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_1700 end====");
                done();
            });
        });

        it('ActsAccountAuthToken_1800', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>deleteAuthToken ActsAccountAuthToken_1800 start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_accountNotExit",OWNERSELF,"authType","account_promise_accountNotExit_token");
            }
            catch(err){
                console.debug("====>deleteAuthToken ActsAccountAuthToken_1800 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_1800 end====");
                done();
            }
        });



        it('ActsAccountAuthToken_1900', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_1900 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_repeatDelete", (err)=>{
                console.debug("====>createAccount ActsAccountAuthToken_1900 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.deleteAuthToken("account_callback_repeatDelete",OWNERSELF,"aythType","promise_repeatDelete_token",(err)=>{
                    console.debug("====>deleteAuthToken  ActsAccountAuthToken_1900 err:" + JSON.stringify(err));
                    appAccountManager.getAuthToken("account_callback_repeatDelete",OWNERSELF,"authType", (err, data)=>{
                        console.debug("====>getAuthToken ActsAccountAuthToken_1900 err:" + JSON.stringify(err));
                        console.debug("====>getAuthToken ActsAccountAuthToken_1900 data:" + data);
                        expect(err.code != 0).assertEqual(true);
                        expect(data).assertEqual(null);
                        appAccountManager.removeAccount("account_callback_repeatDelete", (err)=>{
                            console.debug("====>removeAccount ActsAccountAuthToken_1900 err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_1900 end====");
                            done();
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_2000', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_2000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_2000 createAccount start====");
            await appAccountManager.createAccount("account_promise_noExitToken");
            console.debug("====>deleteAuthToken ActsAccountAuthToken_2000 start====");
            await appAccountManager.deleteAuthToken("account_promise_noExitToken",OWNERSELF,"aythType","test_token").catch((err)=>{
            console.debug("====>deleteAuthToken ActsAccountAuthToken_2000 err:" + JSON.stringify(err));
            });
            console.debug("====>getAuthToken ActsAccountAuthToken_2000 start====");
            try{
                var data = await appAccountManager.getAuthToken("account_promise_noExitToken",OWNERSELF,"authType");
            }
            catch(err){
                console.debug("====>getAuthToken ActsAccountAuthToken_2000 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_2000 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_noExitToken");
                console.debug("====>ActsAccountAuthToken_2000 end====");
                done();
            }
        });


        it('ActsAccountAuthToken_2100', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_2100 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_repeatDelete", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_2100 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_repeatDelete","authType","",(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_2100 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_repeatDelete",OWNERSELF,"aythType","promise_repeatDelete_token",(err)=>{
                        console.debug("====>deleteAuthToken first ActsAccountAuthToken_2100 err:" + JSON.stringify(err));
                        appAccountManager.getAuthToken("account_callback_repeatDelete",OWNERSELF,"authType", (err, data)=>{
                            console.debug("====>getAuthToken first ActsAccountAuthToken_2100 err:" + JSON.stringify(err));
                            console.debug("====>getAuthToken first ActsAccountAuthToken_2100 data:" + data);
                            expect(err.code != 0).assertEqual(true);
                            expect(data).assertEqual(null);
                            appAccountManager.deleteAuthToken("account_callback_repeatDelete",OWNERSELF,"aythType","promise_repeatDelete_token",(err)=>{
                                console.debug("====>deleteAuthToken second ActsAccountAuthToken_2100 err:" + JSON.stringify(err));
                                appAccountManager.getAuthToken("account_callback_repeatDelete",OWNERSELF,"authType", (err, data)=>{
                                    console.debug("====>getAuthToken second ActsAccountAuthToken_2100 err:" + JSON.stringify(err));
                                    console.debug("====>getAuthToken second ActsAccountAuthToken_2100 data:" + data);
                                    expect(err.code != 0).assertEqual(true);
                                    expect(data).assertEqual(null);
                                    appAccountManager.removeAccount("account_callback_repeatDelete", (err)=>{
                                        console.debug("====>removeAccount ActsAccountAuthToken_2100 err:" + JSON.stringify(err));
                                        expect(err).assertEqual(null);
                                        console.debug("====>ActsAccountAuthToken_2100 end====");
                                        done();
                                    });
                                });
                            });
                        });
                    });
                });
            });
        });



        it('ActsAccountAuthToken_2200', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_2200 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_2200 createAccount start====");
            await appAccountManager.createAccount("account_promise_repeatDelete");
            console.debug("====>setAuthToken ActsAccountAuthToken_2200 start====");
            await appAccountManager.setAuthToken("account_promise_repeatDelete","aythType","promise_repeatDelete_token");
            console.debug("====>deleteAuthToken first ActsAccountAuthToken_2200 start====");
            await appAccountManager.deleteAuthToken("account_promise_repeatDelete",OWNERSELF,"aythType","promise_repeatDelete_token");            
            try{
                console.debug("====>deleteAuthToken second ActsAccountAuthToken_2200 start====");
                await appAccountManager.deleteAuthToken("account_promise_repeatDelete",OWNERSELF,"aythType","promise_repeatDelete_token");
            }catch(err){
                console.debug("====>deleteAuthToken second ActsAccountAuthToken_2200 err:" + JSON.stringify(err));
1344
                expect(err.code == ERR_JS_AUTH_TYPE_NOT_FOUND).assertEqual(true);
1345 1346 1347 1348
            }  
            try{
                console.debug("====>getAuthToken ActsAccountAuthToken_2200 start====");
                var data = await appAccountManager.getAuthToken("account_promise_repeatDelete",OWNERSELF,"authType");
1349
                done();
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429
            }
            catch(err){
                console.debug("====>getAuthToken ActsAccountAuthToken_2200 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_2200 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_repeatDelete");
                console.debug("====>ActsAccountAuthToken_2200 end====");
                done();
            }
        });


        it('ActsAccountAuthToken_2300', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_2300 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_setEmptyToken", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_2300 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_setEmptyToken","authType","",(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_2300 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_setEmptyToken",OWNERSELF,"authType", (err, data)=>{
                        console.debug("====>getAuthToken ActsAccountAuthToken_2300 err:" + JSON.stringify(err));
                        console.debug("====>getAuthToken ActsAccountAuthToken_2300 data:" + data);
                        expect(err.code != 0).assertEqual(true);
                        expect(data).assertEqual(null);
                        appAccountManager.removeAccount("account_callback_setEmptyToken", (err)=>{
                            console.debug("====>removeAccount ActsAccountAuthToken_2300 err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_2300 end====");
                            done();
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_2400', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_2400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_2400 createAccount start====");
            await appAccountManager.createAccount("account_promise_setEmptyToken");
            console.debug("====>setAuthToken ActsAccountAuthToken_2400 start====");
            await appAccountManager.setAuthToken("account_promise_setEmptyToken","aythType","");
            console.debug("====>getAuthToken ActsAccountAuthToken_2400 start====");
            try{
                await appAccountManager.getAuthToken("account_promise_setEmptyToken","authType",limitToken);
            }
            catch(err){
                console.debug("====>getAuthToken ActsAccountAuthToken_2400 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_2400 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_setEmptyToken");
                console.debug("====>ActsAccountAuthToken_2400 end====");
                done();
            }
        });



        it('ActsAccountAuthToken_2500', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_2500 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_spaceToken", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_2500 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_spaceToken","authType"," ",(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_2500 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_spaceToken",OWNERSELF,"authType", (err, data)=>{
                        console.debug("====>getAuthToken ActsAccountAuthToken_2500 err:" + JSON.stringify(err));
                        console.debug("====>getAuthToken ActsAccountAuthToken_2500 data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual(" ");
                        appAccountManager.removeAccount("account_callback_spaceToken", (err)=>{
                            console.debug("====>removeAccount ActsAccountAuthToken_2500 err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_2500 end====");
                            done();
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_2600', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_2600 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_2600 createAccount start====");
            await appAccountManager.createAccount("account_promise_spaceToken");
            console.debug("====>setAuthToken ActsAccountAuthToken_2600 start====");
            await appAccountManager.setAuthToken("account_promise_spaceToken","aythType"," ");
            console.debug("====>getAuthToken ActsAccountAuthToken_2600 start====");
            var data = await appAccountManager.getAuthToken("account_promise_spaceToken",OWNERSELF,"aythType");
            expect(data).assertEqual(" ");
            console.debug("====>ActsAccountAuthToken_2600 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_spaceToken");
            console.debug("====>ActsAccountAuthToken_2600 end====");
            done();
        });



        it('ActsAccountAuthToken_2700', 0, async function(done) {
            var limitToken = '';
                for (let i = 0; i < TOKENLENGTHLIMIT + 1; i++) {
                    limitToken += 't';
                }
            console.debug("====>ActsAccountAuthToken_2700 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_exceed_limitToken", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_2700 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_exceed_limitToken","authType",limitToken,(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_2700 err:" + JSON.stringify(err));
                    expect(err.code!=0).assertEqual(true);
                    appAccountManager.removeAccount("account_callback_exceed_limitToken", (err)=>{
                        console.debug("====>removeAccount ActsAccountAuthToken_2700 err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_2700 end====");
                        done();
                    });
                });
            });
        });


        it('ActsAccountAuthToken_2800', 0, async function(done) {
            var limitToken = '';
                for (let i = 0; i < TOKENLENGTHLIMIT + 1; i++) {
                    limitToken += 't';
                }
            console.debug("====>ActsAccountAuthToken_2800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_2800 createAccount start====");
            await appAccountManager.createAccount("account_promise_exceed_limitToken");
            console.debug("====>setAuthToken ActsAccountAuthToken_2800 start====");
            try{
                await appAccountManager.setAuthToken("account_promise_exceed_limitToken","authType",limitToken);
            }
            catch(err){
                console.debug("====>setAuthToken ActsAccountAuthToken_2800 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_2800 removeAccount start====");
                appAccountManager.removeAccount("account_promise_exceed_limitToken");
                console.debug("====>ActsAccountAuthToken_2800 end====");
                done();
            }
        });


        it('ActsAccountAuthToken_2900', 0, async function(done) {
            var limitToken = '';
                for (let i = 0; i < TOKENLENGTHLIMIT; i++) {
                    limitToken += 't';
                }
            console.debug("====>ActsAccountAuthToken_2900 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_limitToken", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_2900 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_limitToken","authType",limitToken,(err)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_2900 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_limitToken",OWNERSELF,"authType", (err, data)=>{
                        console.debug("====>getAuthToken ActsAccountAuthToken_2900 err:" + JSON.stringify(err));
                        console.debug("====>getAuthToken ActsAccountAuthToken_2900 data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual(limitToken);
                        appAccountManager.removeAccount("account_callback_limitToken", (err)=>{
                            console.debug("====>removeAccount ActsAccountAuthToken_2900 err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_2900 end====");
                            done();
                        });
                    });
                });
            });
        });


        it('ActsAccountAuthToken_3000', 0, async function(done) {
            var limitToken = '';
                for (let i = 0; i < TOKENLENGTHLIMIT; i++) {
                    limitToken += 't';
                }
            console.debug("====>ActsAccountAuthToken_3000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3000 createAccount start====");
            await appAccountManager.createAccount("account_promise_limitToken");
            console.debug("====>setAuthToken ActsAccountAuthToken_3000 start====");
            await appAccountManager.setAuthToken("account_promise_limitToken","authType",limitToken);
            console.debug("====>getAuthToken ActsAccountAuthToken_3000 start====");
            var data = await appAccountManager.getAuthToken("account_promise_limitToken",OWNERSELF,"authType");
            expect(data).assertEqual(limitToken);
            console.debug("====>ActsAccountAuthToken_3000 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_limitToken");
            console.debug("====>ActsAccountAuthToken_3000 end====");
            done();
        });


        it('ActsAccountAuthToken_3100', 0, async function(done) {
            var limitAuthType = '';
                for (let i = 0; i < AUTHTYPELENGTHLIMIT + 1; i++) {
                    limitAuthType += 't';
                }
            console.debug("====>ActsAccountAuthToken_3100 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_limitAuthType", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_3100 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_limitAuthType",limitAuthType,"account_callback_limitAuthType_token",(err, data)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_3100 err:" + JSON.stringify(err));
                    expect(err.code!=0).assertEqual(true);
                    appAccountManager.removeAccount("account_callback_limitAuthType", (err)=>{
                        console.debug("====>removeAccount ActsAccountAuthToken_3100 err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_3100 end====");
                        done();
                    });
                });
            });
        });


        it('ActsAccountAuthToken_3200', 0, async function(done) {
            var limitAuthType = '';
                for (let i = 0; i < AUTHTYPELENGTHLIMIT + 1; i++) {
                    limitAuthType += 't';
                }
            console.debug("====>ActsAccountAuthToken_3400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3400 createAccount start====");
            await appAccountManager.createAccount("account_promise_exceed_limitAuthType");
            console.debug("====>setAuthToken ActsAccountAuthToken_3400 start====");
            try{
                await appAccountManager.setAuthToken("account_promise_exceed_limitAuthType",limitAuthType,"account_promise_limitAuthType_token");
            }
            catch(err){
                console.debug("====>setAuthToken ActsAccountAuthToken_3400 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_3400 removeAccount start====");
                appAccountManager.removeAccount("account_promise_exceed_limitAuthType");
                console.debug("====>ActsAccountAuthToken_3400 end====");
                done();
            }
        });



        it('ActsAccountAuthToken_3300', 0, async function(done) {
            var limitAuthType = '';
                for (let i = 0; i < AUTHTYPELENGTHLIMIT + 1; i++) {
                    limitAuthType += 't';
                }
            console.debug("====>ActsAccountAuthToken_3300 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_callback_limitAuthType", (err)=>{
            console.debug("====>createAccount ActsAccountAuthToken_3300 err:" + JSON.stringify(err));
            expect(err).assertEqual(null);
                appAccountManager.getAuthToken("account_callback_limitAuthType","com.example.actsaccounttest",limitAuthType, (err, data)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_3300 err:" + JSON.stringify(err));
                    console.debug("====>getAuthToken ActsAccountAuthToken_3300 data:" + data);
                    expect(err.code!=0).assertEqual(true);
                    appAccountManager.removeAccount("account_callback_limitAuthType", (err)=>{
                        console.debug("====>removeAccount ActsAccountAuthToken_3300 err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_3300 end====");
                        done();
                    });
                });
            });
        });

        it('ActsAccountAuthToken_3400', 0, async function(done) {
            var limitAuthType = '';
                for (let i = 0; i < AUTHTYPELENGTHLIMIT + 1; i++) {
                    limitAuthType += 't';
                }
            console.debug("====>ActsAccountAuthToken_3400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3400 createAccount start====");
            await appAccountManager.createAccount("account_promise_limitAuthType");
            console.debug("====>getAuthToken ActsAccountAuthToken_3400 start====");
            try{
                await appAccountManager.getAuthToken("account_promise_limitAuthType",OWNERSELF,limitAuthType);
            }
            catch(err){
                console.debug("====>getAuthToken ActsAccountAuthToken_3400 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_3400 removeAccount start====");
                appAccountManager.removeAccount("account_promise_limitAuthType");
                console.debug("====>ActsAccountAuthToken_3400 end====");
                done();
            }
        });



        /*
        * @tc.number     : ActsAccountAuthToken_2700
        * @tc.name       : Test auth token in callback form
        * @tc.desc       : 设置一个authType长度刚好为限制长度的token  查询
        */
        it('ActsAccountAuthToken_3500', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_3500 start====");
            var limitAuthType = '';
            for (let i = 0; i < AUTHTYPELENGTHLIMIT; i++) {
                limitAuthType += 't';
            }
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3500 create finish====");
            appAccountManager.createAccount("account_callback_limitAuthType", (err)=>{
                console.debug("====>add account ActsAccountAuthToken_3500 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_limitAuthType",limitAuthType,"account_callback_limitAuthType_token", (err)=>{
                    console.debug("====>setAuthToken ActsAccountAuthToken_3500 err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_limitAuthType","com.example.actsaccountoperatetest",limitAuthType, (err, data)=>{
                        console.debug("====>getAuthToken ActsAccountAuthToken_3500 err:" + JSON.stringify(err));
                        console.debug("====>getAuthToken ActsAccountAuthToken_3500 data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("account_callback_limitAuthType_token");
                        appAccountManager.removeAccount("account_callback_limitAuthType", (err)=>{
                            console.debug("====>delete Account ActsAccountAuthToken_3500 err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_3500 end====");
                            done();
                        });
                    });
                });
            });
        });
        
        /*
        * @tc.number     : ActsAccountAuthToken_2800
        * @tc.name       : Test auth token in promise form
        * @tc.desc       : 设置一个authType长度刚好为限制长度的token
        */
        
        /*
        * @tc.number     : ActsAccountAuthToken_2900
        * @tc.name       : Test auth token in callback form
        * @tc.desc       : Clear token parameter name is an empty string
        */
        //测试 删除一个账号名为空的token callback方式
        it('ActsAccountAuthToken_4100', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_4100 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4100 create finish====");
            appAccountManager.deleteAuthToken(" ","com.example.actsaccounttest","authType","account_notExist_token", (err)=>{
                console.debug("====>clearauthToken ActsAccountAuthToken_4100 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_4100 end====");
                done();
            });
        });
        
        /*
        * @tc.number     : ActsAccountAuthToken_3000
        * @tc.name       : Test auth token in promise form
        * @tc.desc       : Clear token parameter name is an empty string
        */
        //测试 删除一个账号名为空的token promise方式
        it('ActsAccountAuthToken_4200', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_4200 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4200 create finish====");
            console.debug("====>clearauthToken ActsAccountAuthToken_4200 start====");
            try{
                await appAccountManager.deleteAuthToken("","com.example.actsaccounttest","authType","account_notExist_token");
            }
            catch(err){
                console.debug("====>deleteAuthToken ActsAccountAuthToken_4200 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_4200 end====");
                done();
            }
        });
        
        /*
        * @tc.number     : ActsAccountAuthToken_3100
        * @tc.name       : Test auth token in callback form
        * @tc.desc       : The clear token parameter name is a space string
        */
        it('ActsAccountAuthToken_4300', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_4300 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4300 create finish====");
            appAccountManager.deleteAuthToken(" ","com.example.actsaccounttest","authType","account_notExist_token", (err)=>{
                console.debug("====>clearauthToken ActsAccountAuthToken_4300 err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_4300 end====");
                done();
            });
        });
        
        /*
        * @tc.number     : ActsAccountAuthToken_3200
        * @tc.name       : Test auth token in promise form
        * @tc.desc       : The clear token parameter name is a space string
        */
        it('ActsAccountAuthToken_4400', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_4400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4400 create finish====");
            console.debug("====>clearauthToken ActsAccountAuthToken_4400 start====");
            try{
                await appAccountManager.deleteAuthToken(" ","com.example.actsaccounttest","authType","account_notExist_token");
            }
            catch(err){
                console.debug("====>deleteAuthToken ActsAccountAuthToken_4400 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_4400 end====");
                done();
            }
        });
    
        /*
        * @tc.number     : ActsAccountAuthToken_3300
        * @tc.name       : Test auth token in callback form
        * @tc.desc       : Clear the token parameter name exceeds the length limit of 1024 characters
        */
        it('ActsAccountAuthToken_4500', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_4500 start====");
            var nameLimit = '';
            for (let i = 0; i < LENGTHLIMIT + 1; i++) {
                nameLimit += 't';
            }
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4500 create finish====");
            appAccountManager.deleteAuthToken(nameLimit,"com.example.actsaccounttest","authType","account_notExist_token", (err)=>{
                console.debug("====>clearauthToken ActsAccountAuthToken_4500 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_4500 end====");
                done();
            });
        });
    
        /*
        * @tc.number     : ActsAccountAuthToken_3400
        * @tc.name       : Test auth token in promise form
        * @tc.desc       : Clear the token parameter name exceeds the length limit of 1024 characters
        */
        it('ActsAccountAuthToken_4600', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_4600 start====");
            var nameLimit = '';
            for (let i = 0; i < LENGTHLIMIT + 1; i++) {
                nameLimit += 't';
            }
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4600 create finish====");
            console.debug("====>deleteAuthToken ActsAccountAuthToken_4600 start====");
            try{
                await appAccountManager.deleteAuthToken(nameLimit,"com.example.actsaccounttest","authType","account_notExist_token");
            }
            catch(err){
                console.debug("====>deleteAuthToken ActsAccountAuthToken_4600 err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_4600 end====");
                done();
            }
        });
    
        //查询无效包名owner(为其他字符串时)账号的token callback方式
        it('ActsAccountAuthToken_4700', 0, async function(done) {
            console.debug("====>ActsAccountAuthToken_4700 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4700 create finish====");
            appAccountManager.createAccount("account_callback_invalid_owner", (err)=>{
                console.debug("====>add account ActsAccountAuthToken_4700 err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAuthToken("account_callback_invalid_owner","invalid_owner","authType", (err, data)=>{
                    console.debug("====>getAuthToken ActsAccountAuthToken_4700 err:" + JSON.stringify(err));
                    console.debug("====>getAuthToken ActsAccountAuthToken_4700 data:" + data);
                    expect(err.code!=0).assertEqual(true);
                    expect(data).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_invalid_owner", (err)=>{
                        console.debug("====>delete account ActsAccountAuthToken_4700 err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_4700 end====");
                        done();
                    });
                });
            });
        });


        it('ActsAccountAuthToken_3600', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_3600 start====");
            var limitAuthType = '';
            for (var i = 0; i < AUTHTYPELENGTHLIMIT; i++) {
                limitAuthType += 't';
            }
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3600 createAccount start====");
            await appAccountManager.createAccount("account_promise_limitAuthType");
            console.debug("====>ActsAccountAuthToken_3600 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_limitAuthType",limitAuthType,"account_promise_limitAuthType_token");
            console.debug("====>ActsAccountAuthToken_3600 getAuthToken start====");
            var data = await appAccountManager.getAuthToken("account_promise_limitAuthType",OWNERSELF,limitAuthType);
            expect(data).assertEqual("account_promise_limitAuthType_token");
            console.debug("====>ActsAccountAuthToken_3600 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_limitAuthType");
            console.debug("====>ActsAccountAuthToken_3600 end====");
            done();
        });
    
        
        it('ActsAccountAuthToken_3700', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_3700 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3700 createAccount start====");
            appAccountManager.createAccount("account_callback_authType_empty",(err)=>{
                console.debug("====>ActsAccountAuthToken_3700 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_authType_empty","","account_callback_authType_empty_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_3700 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_authType_empty",OWNERSELF,"",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_3700 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_3700 getAuthToken data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("account_callback_authType_empty_token");
                        appAccountManager.removeAccount("account_callback_authType_empty",(err)=>{
                            console.debug("====>ActsAccountAuthToken_3700 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_3700 end====");
                            done();
                        });
                    });
                });
            });
        });
        
        it('ActsAccountAuthToken_3800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_3800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3800 createAccount start====");
            await appAccountManager.createAccount("account_promise_authType_empty");
            console.debug("====>ActsAccountAuthToken_3800 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_authType_empty","","account_promise_authType_empty_token");
            console.debug("====>ActsAccountAuthToken_3800 getAuthToken start====");
            var data = await appAccountManager.getAuthToken("account_promise_authType_empty",OWNERSELF,"");
            expect(data).assertEqual("account_promise_authType_empty_token");
            console.debug("====>ActsAccountAuthToken_3800 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_authType_empty");
            console.debug("====>ActsAccountAuthToken_3800 end====");
            done();
        });
    
        it('ActsAccountAuthToken_3900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_3900 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_3900 createAccount start====");
            appAccountManager.createAccount("account_callback_authType_space",(err)=>{
                console.debug("====>ActsAccountAuthToken_3900 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_authType_space"," ","account_callback_authType_space_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_3900 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_authType_space",OWNERSELF," ",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_3900 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_3900 getAuthToken data:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("account_callback_authType_space_token");
                        appAccountManager.removeAccount("account_callback_authType_space",(err)=>{
                            console.debug("====>ActsAccountAuthToken_3900 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_3900 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_4000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_4000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4000 createAccount start====");
            await appAccountManager.createAccount("account_promise_authType_space");
            console.debug("====>ActsAccountAuthToken_4000 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_authType_space"," ","account_promise_authType_space_token");
            console.debug("====>ActsAccountAuthToken_4000 getAuthToken start====");
            var data = await appAccountManager.getAuthToken("account_promise_authType_space",OWNERSELF," ");
            expect(data).assertEqual("account_promise_authType_space_token");
            console.debug("====>ActsAccountAuthToken_4000 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_authType_space");
            console.debug("====>ActsAccountAuthToken_4000 end====");
            done();
        });
    
    
        it('ActsAccountAuthToken_4800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_4800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4800 createAccount start====");
            await appAccountManager.createAccount("account_promise_invalid_owner");
            console.debug("====>ActsAccountAuthToken_4800 getAuthToken start====");
            try{
                var data = await appAccountManager.getAuthToken("account_promise_invalid_owner","invalid_owner","authType");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_4800 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_4800 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_invalid_owner");
                console.debug("====>ActsAccountAuthToken_4800 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_4900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_4900 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_4900 createAccount start====");
            appAccountManager.createAccount("account_callback_owner_empty",(err)=>{
                console.debug("====>ActsAccountAuthToken_4900 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAuthToken("account_callback_owner_empty","","authType",(err,data)=>{
                    console.debug("====>ActsAccountAuthToken_4900 getAuthToken err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_4900 getAuthToken data:" + data);
                    expect(err.code!=0).assertEqual(true);
                    expect(data).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_owner_empty",(err)=>{
                        console.debug("====>ActsAccountAuthToken_4900 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_4900 end====");
                        done();
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_5000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5000 createAccount start====");
            await appAccountManager.createAccount("account_promise_owner_empty");
            console.debug("====>ActsAccountAuthToken_5000 getAuthToken start====");
            try{
                var data = await appAccountManager.getAuthToken("account_promise_owner_empty","","authType");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_5000 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_5000 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_owner_empty");
                console.debug("====>ActsAccountAuthToken_5000 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_5100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5100 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5100 createAccount start====");
            appAccountManager.createAccount("account_callback_owner_space",(err)=>{
                console.debug("====>ActsAccountAuthToken_5100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.getAuthToken("account_callback_owner_space"," ","authType",(err,data)=>{
                    console.debug("====>ActsAccountAuthToken_5100 getAuthToken err:" + JSON.stringify(err));
                    console.debug("====>ActsAccountAuthToken_5100 getAuthToken data:" + data);
                    expect(err.code!=0).assertEqual(true);
                    expect(data).assertEqual(null);
                    appAccountManager.removeAccount("account_callback_owner_space",(err)=>{
                        console.debug("====>ActsAccountAuthToken_5100 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_5100 end====");
                        done();
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_5200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5200 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5200 createAccount start====");
            await appAccountManager.createAccount("account_callback_owner_space");
            console.debug("====>ActsAccountAuthToken_5200 getAuthToken start====");
            try{
                var data = await appAccountManager.getAuthToken("account_callback_owner_space"," ","authType");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_5200 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_5200 removeAccount start====");
                await appAccountManager.removeAccount("account_callback_owner_space");
                console.debug("====>ActsAccountAuthToken_5200 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_5300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5300 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5300 createAccount start====");
            appAccountManager.createAccount("account_callback_authType_invalid",(err)=>{
                console.debug("====>ActsAccountAuthToken_5300 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_authType_invalid","authType","account_callback_authType_invalid_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_5300 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_authType_invalid",OWNERSELF,"invalid_authType",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_5300 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_5300 getAuthToken data:" + data);
                        expect(err.code!=0).assertEqual(true);
                        expect(data).assertEqual(null);
                        appAccountManager.removeAccount("account_callback_authType_invalid",(err)=>{
                            console.debug("====>ActsAccountAuthToken_5300 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_5300 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_5400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5400 createAccount start====");
            await appAccountManager.createAccount("account_promise_authType_invalid");
            console.debug("====>ActsAccountAuthToken_5400 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_authType_invalid","authType","account_promise_authType_invalid_token");
            console.debug("====>ActsAccountAuthToken_5400 getAuthToken start====");
            try{
                var data = await appAccountManager.getAuthToken("account_promise_authType_invalid",OWNERSELF,"invalid_authType");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_5400 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_5400 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_authType_invalid");
                console.debug("====>ActsAccountAuthToken_5400 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_5500', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5500 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5500 createAccount start====");
            appAccountManager.createAccount("account_callback_authType_empty",(err)=>{
                console.debug("====>ActsAccountAuthToken_5500 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_authType_empty","authType","account_callback_authType_empty_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_5500 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_authType_empty",OWNERSELF,"",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_5500 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_5500 getAuthToken data:" + data);
                        expect(err.code!=0).assertEqual(true);
                        expect(data).assertEqual(null);
                        appAccountManager.removeAccount("account_callback_authType_empty",(err)=>{
                            console.debug("====>ActsAccountAuthToken_5500 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_5500 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_5600', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5600 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5600 createAccount start====");
            await appAccountManager.createAccount("account_promise_authType_empty");
            console.debug("====>ActsAccountAuthToken_5600 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_authType_empty","authType","account_promise_authType_empty_token");
            console.debug("====>ActsAccountAuthToken_5600 getAuthToken start====");
            try{
                var data = await appAccountManager.getAuthToken("account_promise_authType_empty",OWNERSELF,"");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_5600 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_5600 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_authType_empty");
                console.debug("====>ActsAccountAuthToken_5600 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_5700', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5700 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5700 createAccount start====");
            appAccountManager.createAccount("account_callback_authType_space",(err)=>{
                console.debug("====>ActsAccountAuthToken_5700 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_authType_space","authType","account_callback_authType_space_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_5700 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_callback_authType_space",OWNERSELF," ",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_5700 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_5700 getAuthToken data:" + data);
                        expect(err.code!=0).assertEqual(true);
                        expect(data).assertEqual(null);
                        appAccountManager.removeAccount("account_callback_authType_space",(err)=>{
                            console.debug("====>ActsAccountAuthToken_5700 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_5700 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_5800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5800 createAccount start====");
            await appAccountManager.createAccount("account_promise_authType_space");
            console.debug("====>ActsAccountAuthToken_5800 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_authType_space","authType","account_promise_authType_space_token");
            console.debug("====>ActsAccountAuthToken_5800 getAuthToken start====");
            try{
                var data = await appAccountManager.getAuthToken("account_promise_authType_space",OWNERSELF," ");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_5800 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_5800 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_authType_space");
                console.debug("====>ActsAccountAuthToken_5800 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_5900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_5900 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_5900 createAccount start====");
            appAccountManager.createAccount("account_callback_owner_invalid",(err)=>{
                console.debug("====>ActsAccountAuthToken_5900 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_owner_invalid","authType","account_callback_owner_invalid_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_5900 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_owner_invalid","invalid_owner","authType","account_callback_owner_invalid_token",(err)=>{
                        console.debug("====>ActsAccountAuthToken_5900 getAuthToken err:" + JSON.stringify(err));
                        expect(err.code!=0).assertEqual(true);
                        appAccountManager.removeAccount("account_callback_owner_invalid",(err)=>{
                            console.debug("====>ActsAccountAuthToken_5900 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_5900 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_6000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_6000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6000 createAccount start====");
            await appAccountManager.createAccount("account_promise_owner_invalid");
            console.debug("====>ActsAccountAuthToken_6000 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_owner_invalid","authType","account_promise_owner_invalid_token");
            console.debug("====>ActsAccountAuthToken_6000 getAuthToken start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_owner_invalid","invalid_owner","authType","account_promise_owner_invalid_token");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_6000 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_6000 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_owner_invalid");
                console.debug("====>ActsAccountAuthToken_6000 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_6100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_6100 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6100 createAccount start====");
            appAccountManager.createAccount("account_callback_owner_empty",(err)=>{
                console.debug("====>ActsAccountAuthToken_6100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_owner_empty","authType","account_callback_owner_empty_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_6100 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_owner_empty","","authType","account_callback_owner_empty_token",(err)=>{
                        console.debug("====>ActsAccountAuthToken_6100 getAuthToken err:" + JSON.stringify(err));
                        expect(err.code!=0).assertEqual(true);
                        appAccountManager.removeAccount("account_callback_owner_empty",(err)=>{
                            console.debug("====>ActsAccountAuthToken_6100 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_6100 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_6200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_6200 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6200 createAccount start====");
            await appAccountManager.createAccount("account_promise_owner_empty");
            console.debug("====>ActsAccountAuthToken_6200 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_owner_empty","authType","account_promise_owner_empty_token");
            console.debug("====>ActsAccountAuthToken_6200 getAuthToken start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_owner_empty","","authType","account_promise_owner_empty_token");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_6200 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_6200 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_owner_empty");
                console.debug("====>ActsAccountAuthToken_6200 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_6300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_6300 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6300 createAccount start====");
            appAccountManager.createAccount("account_callback_owner_space",(err)=>{
                console.debug("====>ActsAccountAuthToken_6300 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_owner_space","authType","account_callback_owner_space_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_6300 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_owner_space"," ","authType","account_callback_owner_space_token",(err)=>{
                        console.debug("====>ActsAccountAuthToken_6300 getAuthToken err:" + JSON.stringify(err));
                        expect(err.code!=0).assertEqual(true);
                        appAccountManager.removeAccount("account_callback_owner_space",(err)=>{
                            console.debug("====>ActsAccountAuthToken_6300 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_6300 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_6400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_6400 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6400 createAccount start====");
            await appAccountManager.createAccount("account_promise_owner_space");
            console.debug("====>ActsAccountAuthToken_6400 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_owner_space","authType","account_promise_owner_space_token");
            console.debug("====>ActsAccountAuthToken_6400 getAuthToken start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_owner_space"," ","authType","account_promise_owner_space_token");
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_6400 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_6400 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_owner_space");
                console.debug("====>ActsAccountAuthToken_6400 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_6500', 0, async function (done) {
            var limitToken = '';
            for(var i = 0;i < TOKENLENGTHLIMIT + 1; i++){
                limitToken += 'c';
            }
            console.debug("====>ActsAccountAuthToken_6500 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6500 createAccount start====");
            appAccountManager.createAccount("account_callback_token_exceedLimit",(err)=>{
                console.debug("====>ActsAccountAuthToken_6500 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.deleteAuthToken("account_callback_token_exceedLimit",OWNERSELF,"authType",limitToken,(err)=>{
                    console.debug("====>ActsAccountAuthToken_6500 getAuthToken err:" + JSON.stringify(err));
                    expect(err.code!=0).assertEqual(true);
                    appAccountManager.removeAccount("account_callback_token_exceedLimit",(err)=>{
                        console.debug("====>ActsAccountAuthToken_6500 removeAccount err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        console.debug("====>ActsAccountAuthToken_6500 end====");
                        done();
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_6600', 0, async function (done) {
            var limitToken = '';
            for(var i = 0;i < TOKENLENGTHLIMIT + 1; i++){
                limitToken += 'c';
            }
            console.debug("====>ActsAccountAuthToken_6600 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6600 createAccount start====");
            await appAccountManager.createAccount("account_promise_token_exceedLimit");
            console.debug("====>ActsAccountAuthToken_6600 deleteAuthToken start====");
            try{
                await appAccountManager.deleteAuthToken("account_promise_token_exceedLimit",OWNERSELF,"authType",limitToken);
            }
            catch(err){
                console.debug("====>ActsAccountAuthToken_6600 getAuthToken err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                console.debug("====>ActsAccountAuthToken_6600 removeAccount start====");
                await appAccountManager.removeAccount("account_promise_token_exceedLimit");
                console.debug("====>ActsAccountAuthToken_6600 end====");
                done();
            }
        });
    
        it('ActsAccountAuthToken_6700', 0, async function (done) {
            var limitToken = '';
            for(var i = 0;i < TOKENLENGTHLIMIT; i++){
                limitToken += 'c';
            }
            console.debug("====>ActsAccountAuthToken_6700 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6700 createAccount start====");
            appAccountManager.createAccount("account_callback_token_limit",(err)=>{
                console.debug("====>ActsAccountAuthToken_6700 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_token_limit","authType",limitToken,(err)=>{
                    console.debug("====>ActsAccountAuthToken_6700 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_token_limit",OWNERSELF,"authType",limitToken,(err)=>{
                        console.debug("====>ActsAccountAuthToken_6700 getAuthToken err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.removeAccount("account_callback_token_limit",(err)=>{
                            console.debug("====>ActsAccountAuthToken_6700 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_6700 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_6800', 0, async function (done) {
            var limitToken = '';
            for(var i = 0;i < TOKENLENGTHLIMIT; i++){
                limitToken += 'c';
            }
            console.debug("====>ActsAccountAuthToken_6800 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6800 createAccount start====");
            await appAccountManager.createAccount("account_promise_token_limit");
            console.debug("====>ActsAccountAuthToken_6800 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_token_limit","authType",limitToken);
            console.debug("====>ActsAccountAuthToken_6800 deleteAuthToken start====");
            await appAccountManager.deleteAuthToken("account_promise_token_limit",OWNERSELF,"authType",limitToken);
            console.debug("====>ActsAccountAuthToken_6800 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_token_limit");
            console.debug("====>ActsAccountAuthToken_6800 end====");
            done();
        });
    
        it('ActsAccountAuthToken_6900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_6900 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_6900 createAccount start====");
            appAccountManager.createAccount("account_callback_delete_space",(err)=>{
                console.debug("====>ActsAccountAuthToken_6900 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_callback_delete_space","authType","account_callback_delete_space_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_6900 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.deleteAuthToken("account_callback_delete_space", OWNERSELF,"authType", "",(err)=>{
                        console.debug("====>ActsAccountAuthToken_6900 deleteAuthToken err:" + JSON.stringify(err));
2430
                        expect(err).assertEqual(null)
2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455
                        appAccountManager.getAuthToken("account_callback_delete_space", OWNERSELF, "authType",(err,data)=>{
                            console.debug("====>ActsAccountAuthToken_6900 getAuthToken err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_6900 getAuthToken data:" + data);
                            expect(err).assertEqual(null);
                            expect(data).assertEqual("account_callback_delete_space_token");
                            appAccountManager.removeAccount("account_callback_delete_space",(err)=>{
                                console.debug("====>ActsAccountAuthToken_6900 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_6900 end====");
                                done();
                            });
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_7000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_7000 start====");
            var appAccountManager = account.createAppAccountManager();
            console.debug("====>ActsAccountAuthToken_7000 createAccount start====");
            await appAccountManager.createAccount("account_promise_delete_space");
            console.debug("====>ActsAccountAuthToken_7000 setAuthToken start====");
            await appAccountManager.setAuthToken("account_promise_delete_space","authType","account_promise_delete_space_token");
            console.debug("====>ActsAccountAuthToken_7000 deleteAuthToken start====");
2456 2457 2458 2459 2460 2461 2462 2463
            await appAccountManager.deleteAuthToken("account_promise_delete_space",OWNERSELF,"authType","");
            console.debug("====>ActsAccountAuthToken_7000 getAuthToken start====");
            var data = await appAccountManager.getAuthToken("account_promise_delete_space",OWNERSELF,"authType");
            expect(data).assertEqual("account_promise_delete_space_token");
            console.debug("====>ActsAccountAuthToken_7000 removeAccount start====");
            await appAccountManager.removeAccount("account_promise_delete_space");
            console.debug("====>ActsAccountAuthToken_7000 end====");
            done();            
2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557
        });
    
        it('ActsAccountAuthToken_9200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9200 start====");
            var appAccountManager = account.createAppAccountManager();  
            appAccountManager.getAuthCallback("test_sessionId").then(()=>{
                expect().assertFail();
                done();
            })                    
            .catch((err)=>{
                console.debug("====>ActsAccountAuthToken_9200 getAuthCalback err:" + JSON.stringify(err));
                expect(err.code != 0).assertEqual(true)
                done();
            })
        });
    
        it('ActsAccountAuthToken_9300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9300 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.getAuthCallback("").then(()=>{
                expect().assertFail();
                done();
            })                    
            .catch((err)=>{
                console.debug("====>ActsAccountAuthToken_9300 getAuthCalback err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true)
                done();
            })
        });
    
        it('ActsAccountAuthToken_9400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9400 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.getAuthCallback(" ").then(()=>{
                expect().assertFail();
                done();
            })                    
            .catch((err)=>{
                console.debug("====>ActsAccountAuthToken_9400 getAuthCalback err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true)
                done();
            })
        });
    
        it('ActsAccountAuthToken_9500', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9500 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.queryAuthenticatorInfo(OWNERSELF,(err)=>{
                console.debug("====>ActsAccountAuthToken_9500 queryAuthenticatorInfo err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                done();
            });
        });
    
        it('ActsAccountAuthToken_9600', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9600 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.queryAuthenticatorInfo("",(err)=>{
                console.debug("====>ActsAccountAuthToken_9600 queryAuthenticatorInfo err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                done();
            });
        });
    
        it('ActsAccountAuthToken_9700', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9700 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.queryAuthenticatorInfo(" ",(err)=>{
                console.debug("====>ActsAccountAuthToken_9700 queryAuthenticatorInfo err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                done();
            });
        });
    
        it('ActsAccountAuthToken_9800', 0, async function (done) {
            var limiOwner = '';
            for(var i = 0;i < OWNERLENGTHLIMIT + 1; i++){
                limiOwner += 't';
            }
            console.debug("====>ActsAccountAuthToken_9800 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.queryAuthenticatorInfo(limiOwner,(err)=>{
                console.debug("====>ActsAccountAuthToken_9800 queryAuthenticatorInfo err:" + JSON.stringify(err));
                expect(err.code!=0).assertEqual(true);
                done();
            });
        });
    
        it('ActsAccountAuthToken_9900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_9900 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err,)=>{
                console.debug("====>ActsAccountAuthToken_9900 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);            
2558 2559 2560 2561 2562 2563
                appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","authType",valid_owner_name,true).then(()=>{
                    expect().assertFail();
                    done();
                }).catch((err)=>{
                    console.debug("====>ActsAccountAuthToken_9900 setAuthTokenVisibility err:" + JSON.stringify(err));
                    expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND); 
2564 2565 2566 2567 2568 2569
                    appAccountManager.getAuthToken("account_setAuthTokenVisibility_name",OWNERSELF,"authType",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_9900 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_9900 getAuthToken data:" + data);
                        expect(err.code!=0).assertEqual(true);                        
                        appAccountManager.getAuthList("account_setAuthTokenVisibility_name","authType",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_9900 getAuthList err:" + JSON.stringify(err));
2570
                            expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);                        
2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680
                            appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_9900 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);                            
                                console.debug("====>ActsAccountAuthToken_9900 end====");
                                done();
                            });
                        });
                    });
                })
            });
        });
    
        it('ActsAccountAuthToken_10000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10000 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err,)=>{
                console.debug("====>ActsAccountAuthToken_10000 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_10000 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    try{
                        appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","authType","test_BundleName","true",(err)=>{
                            expect().assertFail();
                            done();
                        });
                    }catch(err){
                        expect(err.code == 401).assertEqual(true);
                        console.debug("====>ActsAccountAuthToken_10000 setAuthTokenVisibility err:" + JSON.stringify(err));
                        appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                            console.debug("====>ActsAccountAuthToken_10000 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10000 end====");
                            done();
                        });
                    }
                    
                });
            });
        });
    
        it('ActsAccountAuthToken_10100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10100 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_10100 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    try{
                        appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","authType","test_BundleName","invalid_string",(err)=>{
                            console.debug("====>ActsAccountAuthToken_10100 setAuthTokenVisibility err:" + JSON.stringify(err));
                            expect().assertFail();
                            done();
                        });
                    }catch(err){
                        console.debug("====>ActsAccountAuthToken_10100 setAuthTokenVisibility throw_err:" + JSON.stringify(err));
                        expect(err.code == 401).assertEqual(true);
                        appAccountManager.getAuthList("account_setAuthTokenVisibility_name","authType",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_10100 getAuthList err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10100 getAuthList dataArray:" + JSON.stringify(dataArray));
                            expect(dataArray.length).assertEqual(0);
                            appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_10100 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_10100 end====");
                                done();
                            });
                        });
                    }                        
                });
            });
        });
    
        it('ActsAccountAuthToken_10200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10200 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10200 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_10200 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","authType","",true,(err)=>{
                        console.debug("====>ActsAccountAuthToken_10200 setAuthTokenVisibility err:" + JSON.stringify(err));
                        expect(err.code==12300002).assertEqual(true);
                        appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                            console.debug("====>ActsAccountAuthToken_10200 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10200 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_10300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10300 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10300 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_10300 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","authType"," ",true,(err)=>{
                        console.debug("====>ActsAccountAuthToken_10300 setAuthTokenVisibility err:" + JSON.stringify(err));
2681
                        expect(err.code).assertEqual(12400001);
2682 2683 2684 2685
                        appAccountManager.getAuthList("account_setAuthTokenVisibility_name","authType",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_10300 getAuthList err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10300 getAuthList dataArray:" + JSON.stringify(dataArray));
2686
                            expect(dataArray.length).assertEqual(0);
2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713
                            appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_10300 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_10300 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
        
        it('ActsAccountAuthToken_10400', 0, async function (done) {
            var limitBundleName = '';
            for(var i = 0;i < OWNERLENGTHLIMIT + 1; i++){
                limitBundleName += 't';
            }
            console.debug("====>ActsAccountAuthToken_10400 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10400 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_10400 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","authType",limitBundleName,true,(err)=>{
                        console.debug("====>ActsAccountAuthToken_10400 setAuthTokenVisibility err:" + JSON.stringify(err));
2714
                        expect(err.code).assertEqual(12300002);
2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731
                        appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                            console.debug("====>ActsAccountAuthToken_10400 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10400 end====");
                            done();
                        });
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_10500', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10500 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10500 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
2732
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","","test_token",(err)=>{
2733 2734
                    console.debug("====>ActsAccountAuthToken_10500 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
2735
                    appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","",valid_owner_name,true,(err)=>{
2736 2737 2738 2739 2740 2741 2742
                        console.debug("====>ActsAccountAuthToken_10500 setAuthTokenVisibility err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthList("account_setAuthTokenVisibility_name","",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_10500 getAuthList err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10500 getAuthList dataArray:" + JSON.stringify(dataArray));
                            expect(dataArray.length).assertEqual(1);
2743
                            expect(dataArray[0]).assertEqual(valid_owner_name);
2744 2745
                            appAccountManager.getAuthList("account_setAuthTokenVisibility_name","authType",(err,dataArray)=>{
                                console.debug("====>ActsAccountAuthToken_10500 getAuthList authType:\"authType\" err:" + JSON.stringify(err));
2746
                                expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);
2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765
                                appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                                    console.debug("====>ActsAccountAuthToken_10500 removeAccount err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    console.debug("====>ActsAccountAuthToken_10500 end====");
                                    done();
                                });
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_10600', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10600 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10600 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
2766
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name"," ","test_token",(err)=>{
2767 2768
                    console.debug("====>ActsAccountAuthToken_10600 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
2769
                    appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name"," ",valid_owner_name,true,(err)=>{
2770 2771 2772 2773 2774 2775 2776
                        console.debug("====>ActsAccountAuthToken_10600 setAuthTokenVisibility err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthList("account_setAuthTokenVisibility_name"," ",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_10600 getAuthList err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10600 getAuthList dataArray:" + JSON.stringify(dataArray));
                            expect(dataArray.length).assertEqual(1);
2777
                            expect(dataArray[0]).assertEqual(valid_owner_name);
2778 2779
                            appAccountManager.getAuthList("account_setAuthTokenVisibility_name","authType",(err,dataArray)=>{
                                console.debug("====>ActsAccountAuthToken_10600 getAuthList authType:\"authType\" err:" + JSON.stringify(err));
2780
                                expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);
2781
                                console.debug("====>ActsAccountAuthToken_10600 getAuthList authType:\"authType\" dataArray:" + JSON.stringify(dataArray));
2782
                                expect(dataArray).assertEqual(null);
2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811
                                appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                                    console.debug("====>ActsAccountAuthToken_10600 removeAccount err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    console.debug("====>ActsAccountAuthToken_10600 end====");
                                    done();
                                });
                            });
                        });    
                    });
                });
            });
        });
    
    
        it('ActsAccountAuthToken_10700', 0, async function (done) {
            var limitAuthType = '';
            for(var i = 0;i < AUTHTYPELENGTHLIMIT + 1; i++){
                limitAuthType += 't';
            }
            console.debug("====>ActsAccountAuthToken_10700 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10700 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_10700 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name",limitAuthType,"test_bundleName",true,(err)=>{
                        console.debug("====>ActsAccountAuthToken_10700 setAuthTokenVisibility err:" + JSON.stringify(err));
2812
                        expect(err.code).assertEqual(12300002);
2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838
                        appAccountManager.getAuthList("account_setAuthTokenVisibility_name","authType",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_10700 getAuthList authType:\"authType\" err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_10700 getAuthList authType:\"authType\" dataArray:" + JSON.stringify(dataArray));
                            expect(dataArray.length).assertEqual(0);
                            appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_10700 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_10700 end====");
                                done();
                            });
                        }); 
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_10800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10800 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_setAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_10800 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_setAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_10800 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
2839
                    appAccountManager.setAuthTokenVisibility("account_setAuthTokenVisibility_name","invalid_authType",valid_owner_name,true,(err)=>{
2840
                        console.debug("====>ActsAccountAuthToken_10800 setAuthTokenVisibility err:" + JSON.stringify(err));
2841
                        expect(err.code).assertEqual(12300107);
2842 2843
                        appAccountManager.getAuthList("account_setAuthTokenVisibility_name","invalid_authType",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_10800 getAuthList err:" + JSON.stringify(err));
2844
                            expect(err.code).assertEqual(12300107);
2845
                            console.debug("====>ActsAccountAuthToken_10800 getAuthList dataArray:" + JSON.stringify(dataArray));
2846
                            expect(dataArray).assertEqual(null);
2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867
                            appAccountManager.getAuthList("account_setAuthTokenVisibility_name","authType",(err,dataArray)=>{
                                console.debug("====>ActsAccountAuthToken_10800 getAuthList authType:\"authType\" err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_10800 getAuthList authType:\"authType\" dataArray:" + JSON.stringify(dataArray));
                                expect(dataArray.length).assertEqual(0);
                                appAccountManager.removeAccount("account_setAuthTokenVisibility_name",(err)=>{
                                    console.debug("====>ActsAccountAuthToken_10800 removeAccount err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
                                    console.debug("====>ActsAccountAuthToken_10800 end====");
                                    done();
                                });
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_10900', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_10900 start====");
            var appAccountManager = account.createAppAccountManager();
2868
            appAccountManager.setAuthTokenVisibility("","authType",valid_owner_name,true,(err)=>{
2869
                console.debug("====>ActsAccountAuthToken_10900 setAuthTokenVisibility err:" + JSON.stringify(err));
2870
                expect(err.code).assertEqual(12300002);
2871 2872 2873 2874 2875 2876 2877
                done();
            });
        });
    
        it('ActsAccountAuthToken_11000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_11000 start====");
            var appAccountManager = account.createAppAccountManager();
2878
            appAccountManager.setAuthTokenVisibility(" ","authType",valid_owner_name,true,(err)=>{
2879
                console.debug("====>ActsAccountAuthToken_11000 setAuthTokenVisibility err:" + JSON.stringify(err));
2880
                expect(err.code).assertEqual(12300003);
2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891
                done();
            });
        });
    
        it('ActsAccountAuthToken_11100', 0, async function (done) {
            var limitName = '';
            for(var i = 0; i < LENGTHLIMIT + 1; i++){
                limitName += 't';
            }
            console.debug("====>ActsAccountAuthToken_11100 start====");
            var appAccountManager = account.createAppAccountManager();
2892
            appAccountManager.setAuthTokenVisibility(limitName,"authType",valid_owner_name,true,(err)=>{
2893
                console.debug("====>ActsAccountAuthToken_11100 setAuthTokenVisibility err:" + JSON.stringify(err));
2894
                expect(err.code).assertEqual(12300002);
2895 2896 2897 2898 2899 2900 2901
                done();
            });
        });
    
        it('ActsAccountAuthToken_11200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_11200 start====");
            var appAccountManager = account.createAppAccountManager();
2902
            appAccountManager.setAuthTokenVisibility("no_add_account","authType",valid_owner_name,true,(err)=>{
2903
                console.debug("====>ActsAccountAuthToken_11200 setAuthTokenVisibility err:" + JSON.stringify(err));
2904
                expect(err.code).assertEqual(12300003);
2905 2906 2907 2908 2909 2910 2911
                done();
            });
        });
    
        it('ActsAccountAuthToken_11300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_11300 start====");
            var appAccountManager = account.createAppAccountManager();
2912
            appAccountManager.checkAuthTokenVisibility("","authType",valid_owner_name,(err,stateBack)=>{
2913
                console.debug("====>ActsAccountAuthToken_11300 checkAuthTokenVisibility err:" + JSON.stringify(err));
2914
                expect(err.code).assertEqual(12300002);
2915 2916 2917 2918 2919 2920 2921
                done();
            });
        });
    
        it('ActsAccountAuthToken_11400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_11400 start====");
            var appAccountManager = account.createAppAccountManager();
2922
            appAccountManager.checkAuthTokenVisibility(" ","authType",valid_owner_name,(err,stateBack)=>{
2923
                console.debug("====>ActsAccountAuthToken_11400 checkAuthTokenVisibility err:" + JSON.stringify(err));
2924
                expect(err.code).assertEqual(12300003);
2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935
                done();
            });
        });
    
        it('ActsAccountAuthToken_11500', 0, async function (done) {
            var limitName = '';
            for(var i = 0; i < LENGTHLIMIT + 1; i++){
                limitName += 't';
            }
            console.debug("====>ActsAccountAuthToken_11500 start====");
            var appAccountManager = account.createAppAccountManager();
2936
            appAccountManager.checkAuthTokenVisibility(limitName,"authType",valid_owner_name,(err,stateBack)=>{
2937
                console.debug("====>ActsAccountAuthToken_11500 checkAuthTokenVisibility err:" + JSON.stringify(err));
2938
                expect(err.code).assertEqual(12300002);
2939 2940 2941 2942 2943 2944 2945
                done();
            });
        });
    
        it('ActsAccountAuthToken_11600', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_11600 start====");
            var appAccountManager = account.createAppAccountManager();
2946
            appAccountManager.checkAuthTokenVisibility("no_add_account","authType",valid_owner_name,(err,stateBack)=>{
2947
                console.debug("====>ActsAccountAuthToken_11600 checkAuthTokenVisibility err:" + JSON.stringify(err));
2948
                expect(err.code).assertEqual(12300003);
2949 2950 2951 2952 2953 2954 2955 2956 2957 2958
                done();
            });
        });
    
        it('ActsAccountAuthToken_11700', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_11700 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_checkAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_11700 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
2959
                appAccountManager.setAuthToken("account_checkAuthTokenVisibility_name","","test_token",(err)=>{
2960 2961
                    console.debug("====>ActsAccountAuthToken_11700 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
2962
                    appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name","",valid_owner_name,(err,stateBack)=>{
2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989
                        console.debug("====>ActsAccountAuthToken_11700 checkAuthTokenVisibility err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_11700 checkAuthTokenVisibility stateBack:" + stateBack);
                        expect(err).assertEqual(null);
                        expect(stateBack).assertEqual(false);
                        appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name","",OWNERSELF,(err,stateBack)=>{
                            console.debug("====>ActsAccountAuthToken_11700 checkAuthTokenVisibility err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_11700 checkAuthTokenVisibility stateBack:" + stateBack);
                            expect(err).assertEqual(null);
                            expect(stateBack).assertEqual(true);
                            appAccountManager.removeAccount("account_checkAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_11700 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_11700 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_11800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_11800 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_checkAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_11800 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
2990
                appAccountManager.setAuthToken("account_checkAuthTokenVisibility_name"," ","test_token",(err)=>{
2991 2992
                    console.debug("====>ActsAccountAuthToken_11800 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
2993
                    appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name"," ",valid_owner_name,(err,stateBack)=>{
2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027
                        console.debug("====>ActsAccountAuthToken_11800 checkAuthTokenVisibility err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_11800 checkAuthTokenVisibility stateBack:" + stateBack);
                        expect(err).assertEqual(null);
                        expect(stateBack).assertEqual(false);
                        appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name"," ",OWNERSELF,(err,stateBack)=>{
                            console.debug("====>ActsAccountAuthToken_11800 checkAuthTokenVisibility err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_11800 checkAuthTokenVisibility stateBack:" + stateBack);
                            expect(err).assertEqual(null);
                            expect(stateBack).assertEqual(true);
                            appAccountManager.removeAccount("account_checkAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_11800 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_11800 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_11900', 0, async function (done) {
            var limitAuthType ='';
            for(var i = 0; i < AUTHTYPELENGTHLIMIT + 1; i++){
                limitAuthType += 't';
            }
            console.debug("====>ActsAccountAuthToken_11900 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_checkAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_11900 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_checkAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_11900 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
3028
                    appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name",limitAuthType,valid_owner_name,(err,stateBack)=>{
3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054
                        console.debug("====>ActsAccountAuthToken_11900 checkAuthTokenVisibility err:" + JSON.stringify(err));
                        expect(err.code!=0).assertEqual(true);
                        appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name",limitAuthType,OWNERSELF,(err,stateBack)=>{
                            console.debug("====>ActsAccountAuthToken_11900 checkAuthTokenVisibility err:" + JSON.stringify(err));
                            expect(err.code!=0).assertEqual(true);
                            appAccountManager.removeAccount("account_checkAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_11900 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_11900 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_12000 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_checkAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_12000 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_checkAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_12000 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
3055
                    appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name","invalid_authType",valid_owner_name,(err,stateBack)=>{
3056 3057
                        console.debug("====>ActsAccountAuthToken_12000 checkAuthTokenVisibility err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_12000 checkAuthTokenVisibility stateBack:" + stateBack);
3058
                        expect(err.code).assertEqual(12300107);
3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161
                        appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name","invalid_authType",OWNERSELF,(err,stateBack)=>{
                            console.debug("====>ActsAccountAuthToken_12000 checkAuthTokenVisibility err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_12000 checkAuthTokenVisibility stateBack:" + stateBack);
                            expect(err).assertEqual(null);
                            expect(stateBack).assertEqual(true);
                            appAccountManager.removeAccount("account_checkAuthTokenVisibility_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_12000 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_12000 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_12100 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_checkAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_12100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_checkAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_12100 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name","authType","",(err,stateBack)=>{
                        console.debug("====>ActsAccountAuthToken_12100 checkAuthTokenVisibility err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_12100 checkAuthTokenVisibility stateBack:" + stateBack);
                        expect(err.code!=0).assertEqual(true);
                        appAccountManager.removeAccount("account_checkAuthTokenVisibility_name",(err)=>{
                            console.debug("====>ActsAccountAuthToken_12100 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_12100 end====");
                            done();
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_12200 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_checkAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_12200 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_checkAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_12200 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name","authType"," ",(err,stateBack)=>{
                        console.debug("====>ActsAccountAuthToken_12200 checkAuthTokenVisibility err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_12200 checkAuthTokenVisibility stateBack:" + stateBack);
                        expect(err).assertEqual(null);
                        expect(stateBack).assertEqual(false);
                        appAccountManager.removeAccount("account_checkAuthTokenVisibility_name",(err)=>{
                            console.debug("====>ActsAccountAuthToken_12200 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_12200 end====");
                            done();
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12300', 0, async function (done) {
            var limitBundleName = '';
            for(var i = 0; i < OWNERLENGTHLIMIT + 1; i++){
                limitBundleName += 't';
            }
            console.debug("====>ActsAccountAuthToken_12300 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_checkAuthTokenVisibility_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_12300 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_checkAuthTokenVisibility_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_12300 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.checkAuthTokenVisibility("account_checkAuthTokenVisibility_name","authType",limitBundleName,(err,stateBack)=>{
                        console.debug("====>ActsAccountAuthToken_12300 checkAuthTokenVisibility err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_12300 checkAuthTokenVisibility stateBack:" + stateBack);
                        expect(err.code!=0).assertEqual(true);
                        appAccountManager.removeAccount("account_checkAuthTokenVisibility_name",(err)=>{
                            console.debug("====>ActsAccountAuthToken_12300 removeAccount err:" + JSON.stringify(err));
                            expect(err).assertEqual(null);
                            console.debug("====>ActsAccountAuthToken_12300 end====");
                            done();
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_12400 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_testgetAuthList_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_12400 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_testgetAuthList_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_12400 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
3162
                    appAccountManager.setAuthTokenVisibility("account_testgetAuthList_name","authType",valid_owner_name,true,(err)=>{
3163 3164 3165 3166
                        console.debug("====>ActsAccountAuthToken_12400 setAuthTokenVisibility err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthList("account_testgetAuthList_name","",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_12400 getAuthList err:" + JSON.stringify(err));
3167
                            expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);
3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188
                            appAccountManager.removeAccount("account_testgetAuthList_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_12400 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_12400 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12500', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_12500 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_testgetAuthList_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_12500 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_testgetAuthList_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_12500 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
3189
                    appAccountManager.setAuthTokenVisibility("account_testgetAuthList_name","authType",valid_owner_name,true,(err)=>{
3190 3191 3192 3193
                        console.debug("====>ActsAccountAuthToken_12500 setAuthTokenVisibility err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthList("account_testgetAuthList_name"," ",(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_12500 getAuthList err:" + JSON.stringify(err));
3194
                            expect(err.code).assertEqual(AccountErrCode.ERR_JS_AUTH_TYPE_NOT_FOUND);
3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219
                            appAccountManager.removeAccount("account_testgetAuthList_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_12500 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_12500 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12600', 0, async function (done) {
            var limitAuthType ='';
            for(var i = 0; i < AUTHTYPELENGTHLIMIT + 1; i++){
                limitAuthType += 't';
            }
            console.debug("====>ActsAccountAuthToken_12600 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_testgetAuthList_name",(err)=>{
                console.debug("====>ActsAccountAuthToken_12600 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_testgetAuthList_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_12600 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
3220
                    appAccountManager.setAuthTokenVisibility("account_testgetAuthList_name","authType",valid_owner_name,true,(err)=>{
3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306
                        console.debug("====>ActsAccountAuthToken_12600 setAuthTokenVisibility err:" + JSON.stringify(err));
                        expect(err).assertEqual(null);
                        appAccountManager.getAuthList("account_testgetAuthList_name",limitAuthType,(err,dataArray)=>{
                            console.debug("====>ActsAccountAuthToken_12600 getAuthList err:" + JSON.stringify(err));
                            expect(err.code!=0).assertEqual(true);
                            console.debug("====>ActsAccountAuthToken_12600 getAuthList dataArray:" + JSON.stringify(dataArray));
                            expect(dataArray).assertEqual(null);
                            appAccountManager.removeAccount("account_testgetAuthList_name",(err)=>{
                                console.debug("====>ActsAccountAuthToken_12600 removeAccount err:" + JSON.stringify(err));
                                expect(err).assertEqual(null);
                                console.debug("====>ActsAccountAuthToken_12600 end====");
                                done();
                            });
                        });    
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_12700', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_12700 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.getAuthList("","authType").then((dataArray)=>{
                console.debug("====>ActsAccountAuthToken_12700 getAuthList dataArray:" + JSON.stringify(dataArray));                
                expect(dataArray.length).assertEqual(0);
                done();
            }).catch((err)=>{
                expect(err.code!=0).assertEqual(true);
                done();
            })
        });
    
        it('ActsAccountAuthToken_12800', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_12800 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.getAuthList(" ","authType",(err,dataArray)=>{
                console.debug("====>ActsAccountAuthToken_12800 getAuthList err:" + JSON.stringify(err));
                console.debug("====>ActsAccountAuthToken_12800 getAuthList dataArray:" + JSON.stringify(dataArray));
                expect(err.code!=0).assertEqual(true);
                expect(dataArray).assertEqual(null);
                done();
            });
        });
    
        it('ActsAccountAuthToken_12900', 0, async function (done) {
            var limitName = '';
            for(var i = 0; i < LENGTHLIMIT + 1; i++){
                limitName += 't';
            }
            console.debug("====>ActsAccountAuthToken_12900 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.getAuthList(limitName,"authType",(err,dataArray)=>{
                console.debug("====>ActsAccountAuthToken_12900 getAuthList err:" + JSON.stringify(err));
                console.debug("====>ActsAccountAuthToken_12900 getAuthList dataArray:" + JSON.stringify(dataArray));
                expect(err.code!=0).assertEqual(true);
                expect(dataArray).assertEqual(null);
                done();
            });
        });
    
        it('ActsAccountAuthToken_13000', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_13000 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.getAuthList("no_add_account","authType",(err,dataArray)=>{
                console.debug("====>ActsAccountAuthToken_13000 getAuthList err:" + JSON.stringify(err));
                console.debug("====>ActsAccountAuthToken_13000 getAuthList dataArray:" + JSON.stringify(dataArray));
                expect(err.code!=0).assertEqual(true);
                expect(dataArray).assertEqual(null);
                done();
            });
        });
    
        it('ActsAccountAuthToken_13100', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_13100 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccount("account_tokenTest_name",(err,)=>{
                console.debug("====>ActsAccountAuthToken_13100 createAccount err:" + JSON.stringify(err));
                expect(err).assertEqual(null);
                appAccountManager.setAuthToken("account_tokenTest_name","authType","test_token",(err)=>{
                    console.debug("====>ActsAccountAuthToken_13100 setAuthToken err:" + JSON.stringify(err));
                    expect(err).assertEqual(null);
                    appAccountManager.getAuthToken("account_tokenTest_name",OWNERSELF,"authType",(err,data)=>{
                        console.debug("====>ActsAccountAuthToken_13100 getAuthToken err:" + JSON.stringify(err));
                        console.debug("====>ActsAccountAuthToken_13100 getAuthToken stateBack:" + data);
                        expect(err).assertEqual(null);
                        expect(data).assertEqual("test_token");
3307
                        appAccountManager.checkAuthTokenVisibility("account_tokenTest_name","authType",valid_owner_name,(err,stateBack)=>{
3308 3309 3310 3311 3312 3313 3314 3315 3316
                            console.debug("====>ActsAccountAuthToken_13100 checkAuthTokenVisibility err:" + JSON.stringify(err));
                            console.debug("====>ActsAccountAuthToken_13100 checkAuthTokenVisibility stateBack:" + stateBack);
                            expect(err).assertEqual(null);
                            expect(stateBack).assertEqual(false);
                            appAccountManager.getAuthList("account_tokenTest_name","authType",(err,dataArray)=>{
                                console.debug("====>ActsAccountAuthToken_13100 getAuthList err:" + JSON.stringify(err));
                                console.debug("====>ActsAccountAuthToken_13100 getAuthList dataArray:" + JSON.stringify(dataArray));
                                expect(err).assertEqual(null);
                                expect(dataArray.length).assertEqual(0);
3317
                                appAccountManager.setAuthTokenVisibility("account_tokenTest_name","authType",valid_owner_name,true,(err)=>{
3318 3319
                                    console.debug("====>ActsAccountAuthToken_13100 setAuthTokenVisibility err:" + JSON.stringify(err));
                                    expect(err).assertEqual(null);
3320
                                    appAccountManager.checkAuthTokenVisibility("account_tokenTest_name","authType",valid_owner_name,(err,stateBack)=>{
3321 3322 3323 3324 3325 3326 3327 3328 3329
                                        console.debug("====>ActsAccountAuthToken_13100 checkAuthTokenVisibility err:" + JSON.stringify(err));
                                        console.debug("====>ActsAccountAuthToken_13100 checkAuthTokenVisibility stateBack:" + stateBack);
                                        expect(err).assertEqual(null);
                                        expect(stateBack).assertEqual(true);
                                        appAccountManager.getAuthList("account_tokenTest_name","authType",(err,dataArray)=>{
                                            console.debug("====>ActsAccountAuthToken_13100 getAuthList err:" + JSON.stringify(err));
                                            console.debug("====>ActsAccountAuthToken_13100 getAuthList dataArray:" + JSON.stringify(dataArray));
                                            expect(err).assertEqual(null);
                                            expect(dataArray.length).assertEqual(1);
3330
                                            expect(dataArray[0]).assertEqual(valid_owner_name);
3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405
                                            appAccountManager.removeAccount("account_tokenTest_name",(err)=>{
                                                console.debug("====>ActsAccountAuthToken_13100 removeAccount err:" + JSON.stringify(err));
                                                expect(err).assertEqual(null);
                                                console.debug("====>ActsAccountAuthToken_13100 end====");
                                                done();
                                            });
                                        });
                                    });     
                                });
                            });
                        }); 
                    });
                });
            });
        });
    
        it('ActsAccountAuthToken_13200', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_13200 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.queryAuthenticatorInfo("com.example.actsaccountOauthtoken",(err,dataInfo)=>{
                console.debug("====>ActsAccountAuthToken_13200 queryAuthenticatorInfo err:" + JSON.stringify(err));
                console.debug("====>ActsAccountAuthToken_13200 queryAuthenticatorInfo dataInfo:" + JSON.stringify(dataInfo));
                expect(err).assertEqual(null);
                expect(isNaN(dataInfo.iconId)).assertFalse();
                expect(isNaN(dataInfo.labelId)).assertFalse();
                done();
            });
        });
    
        it('ActsAccountAuthToken_13300', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_13300 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.auth("authenticate_test_account","com.example.actsaccountOauthtoken","authType",{},{
                onResult: (resultCode, resultData)=>{
                    console.debug("====>ActsAccountAuthToken_13300 authenticate resultCode:" + JSON.stringify(resultCode));
                    console.debug("====>ActsAccountAuthToken_13300 authenticate resultData:" + JSON.stringify(resultData));
                    expect(resultCode.code).assertEqual(0);
                    expect(resultData.name).assertEqual("authenticate_test_account");
                    expect(resultData.authType).assertEqual("authType");
                    expect(resultData.token).assertEqual("serviceApp/authenticate/Token");
                    done();
                },
                onRequestRedirected: null
            });
            done();
        });
    
        it('ActsAccountAuthToken_13400', 0, async function (done) {
            console.debug("====>ActsAccountAuthToken_13400 start====");
            var appAccountManager = account.createAppAccountManager();
            appAccountManager.createAccountImplicitly("com.example.actsaccountOauthtoken",{},{
                onResult: (resultCode, resultData) =>{
                    console.debug("====>ActsAccountAuthToken_13400 authenticate resultCode:" + JSON.stringify(resultCode));
                    console.debug("====>ActsAccountAuthToken_13400 authenticate resultData:" + JSON.stringify(resultData));
                    expect(resultCode.code).assertEqual(0);
                    expect(resultData.name).assertEqual("authenticate_test_account");
                    expect(resultData.authType).assertEqual("authType");
                    expect(resultData.token).assertEqual("serviceApp/authenticate/Token");
                    done();
                },
                onRequestRedirected: (request) =>{
                    console.debug("====>ActsAccountAuthToken_13400 onRequestRedirected request:" + JSON.stringify(request));
                    let abilityStartSetting = {
                        want:request
                    }
                    featureAbility.startAbility(abilityStartSetting, (err, result)=>{
                        console.debug("====>ActsAccountAuthToken_13400 onRequestRedirected err:" + JSON.stringify(err));
                    });
                    done();
                }
            });
            done();
        });
    })
}