Produced by Araxis Merge on 10/3/2017 11:16:05 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\utils | VprUpdateOpData-unit-spec.js | Tue Jan 10 16:20:50 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\unittests\utils | VprUpdateOpData-unit-spec.js | Tue Oct 3 13:34:24 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 840 |
| Changed | 1 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | 'use stric t'; | |
| 2 | ||
| 3 | //-------- ---------- ---------- ---------- ---------- ---------- ---------- ------- | |
| 4 | // This co ntains a s et of unit tests for the VprUp dateOpData .js class. | |
| 5 | // | |
| 6 | // Author: Les Westb erg | |
| 7 | //-------- ---------- ---------- ---------- ---------- ---------- ---------- ------- | |
| 8 | ||
| 9 | require('. ./../../en v-setup'); | |
| 10 | var dummyL ogger = re quire(glob al.VX_DUMM IES + 'dum my-logger' ); | |
| 11 | var JdsCli entDummy = require(g lobal.VX_D UMMIES + ' jds-client -dummy'); | |
| 12 | var VprUpd ateOpData = require( global.VX_ UTILS + 'V prUpdateOp Data.js'); | |
| 13 | ||
| 14 | var config = { | |
| 15 | jd s: { | |
| 16 | prot ocol: 'htt p', | |
| 17 | host: ' IP ', | |
| 18 | port: PORT | |
| 19 | } | |
| 20 | }; | |
| 21 | ||
| 22 | var lastUp dateTimeVa lue = '315 0106-1624' ; | |
| 23 | var vistaI dValue = ' C877'; | |
| 24 | var uidVal ue = 'urn: va:vprupda te:' + vis taIdValue; | |
| 25 | ||
| 26 | var jdsCli entDummy = new JdsCl ientDummy( dummyLogge r, config) ; | |
| 27 | ||
| 28 | ||
| 29 | describe(' VprUpdateO pData.js', function( ) { | |
| 30 | be foreEach(f unction() { | |
| 31 | // U nderlying JDS calls to monitor and make sure that they are m ade. | |
| 32 | //-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- --- | |
| 33 | spyO n(jdsClien tDummy, 's toreOperat ionalDataM utable').a ndCallThro ugh(); | |
| 34 | spyO n(jdsClien tDummy, 'g etOperatio nalDataMut able').and CallThroug h(); | |
| 35 | }) ; | |
| 36 | de scribe('st oreLastUpd ateTime()' , function () { | |
| 37 | it(' Happy Path ', functio n() { | |
| 38 | ||
| 39 | var ex pectedJdsR esponse = { | |
| 40 | statusCo de: 200 | |
| 41 | }; | |
| 42 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, undefin ed); | |
| 43 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 44 | var ac tualError; | |
| 45 | var ac tualRespon se; | |
| 46 | var ca lled = fal se; | |
| 47 | vprUpd ateOpData. storeLastU pdateTime( lastUpdate TimeValue, function( error, res ponse) { | |
| 48 | actualEr ror = erro r; | |
| 49 | actualRe sponse = r esponse; | |
| 50 | called = true; | |
| 51 | }); | |
| 52 | ||
| 53 | waitsF or(functio n() { | |
| 54 | return c alled; | |
| 55 | }, 'Ca ll to stor eLastUpdat eTime fail ed to retu rn in time .', 500); | |
| 56 | ||
| 57 | runs(f unction() { | |
| 58 | expect(a ctualError ).toBeNull (); | |
| 59 | expect(a ctualRespo nse).toEqu al('succes s'); | |
| 60 | expect(j dsClientDu mmy.storeO perational DataMutabl e.calls.le ngth).toEq ual(1); | |
| 61 | expect(j dsClientDu mmy.storeO perational DataMutabl e).toHaveB eenCalledW ith(jasmin e.objectCo ntaining({ | |
| 62 | _id: vista IdValue, | |
| 63 | lastUpdate : lastUpda teTimeValu e, | |
| 64 | uid: uidVa lue | |
| 65 | }), jasm ine.any(Fu nction)); | |
| 66 | }); | |
| 67 | }); | |
| 68 | it(' JDS return s error.', function( ) { | |
| 69 | ||
| 70 | var ex pectedJdsE rror = 'Fa iled call to JDS.'; | |
| 71 | jdsCli entDummy._ setRespons eData(expe ctedJdsErr or, null, undefined) ; | |
| 72 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 73 | var ac tualError; | |
| 74 | var ac tualRespon se; | |
| 75 | var ca lled = fal se; | |
| 76 | vprUpd ateOpData. storeLastU pdateTime( lastUpdate TimeValue, function( error, res ponse) { | |
| 77 | actualEr ror = erro r; | |
| 78 | actualRe sponse = r esponse; | |
| 79 | called = true; | |
| 80 | }); | |
| 81 | ||
| 82 | waitsF or(functio n() { | |
| 83 | return c alled; | |
| 84 | }, 'Ca ll to stor eLastUpdat eTime fail ed to retu rn in time .', 500); | |
| 85 | ||
| 86 | runs(f unction() { | |
| 87 | expect(a ctualError .indexOf(e xpectedJds Error)).to BeGreaterT han(-1); | |
| 88 | expect(a ctualRespo nse).toBeN ull(); | |
| 89 | expect(j dsClientDu mmy.storeO perational DataMutabl e.calls.le ngth).toEq ual(1); | |
| 90 | expect(j dsClientDu mmy.storeO perational DataMutabl e).toHaveB eenCalledW ith(jasmin e.objectCo ntaining({ | |
| 91 | _id: vista IdValue, | |
| 92 | lastUpdate : lastUpda teTimeValu e, | |
| 93 | uid: uidVa lue | |
| 94 | }), jasm ine.any(Fu nction)); | |
| 95 | }); | |
| 96 | }); | |
| 97 | it(' JDS return s no error and no re sponse.', function() { | |
| 98 | jdsCli entDummy._ setRespons eData(null , null, un defined); | |
| 99 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 100 | var ac tualError; | |
| 101 | var ac tualRespon se; | |
| 102 | var ca lled = fal se; | |
| 103 | vprUpd ateOpData. storeLastU pdateTime( lastUpdate TimeValue, function( error, res ponse) { | |
| 104 | actualEr ror = erro r; | |
| 105 | actualRe sponse = r esponse; | |
| 106 | called = true; | |
| 107 | }); | |
| 108 | ||
| 109 | waitsF or(functio n() { | |
| 110 | return c alled; | |
| 111 | }, 'Ca ll to stor eLastUpdat eTime fail ed to retu rn in time .', 500); | |
| 112 | ||
| 113 | runs(f unction() { | |
| 114 | expect(a ctualError ).toBeTrut hy(); | |
| 115 | expect(a ctualRespo nse).toBeN ull(); | |
| 116 | expect(j dsClientDu mmy.storeO perational DataMutabl e.calls.le ngth).toEq ual(1); | |
| 117 | expect(j dsClientDu mmy.storeO perational DataMutabl e).toHaveB eenCalledW ith(jasmin e.objectCo ntaining({ | |
| 118 | _id: vista IdValue, | |
| 119 | lastUpdate : lastUpda teTimeValu e, | |
| 120 | uid: uidVa lue | |
| 121 | }), jasm ine.any(Fu nction)); | |
| 122 | }); | |
| 123 | }); | |
| 124 | it(' JDS return s no error but incor rect respo nse.status Code', fun ction() { | |
| 125 | var ex pectedJdsR esponse = { | |
| 126 | statusCo de: 100 | |
| 127 | }; | |
| 128 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, undefin ed); | |
| 129 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 130 | var ac tualError; | |
| 131 | var ac tualRespon se; | |
| 132 | var ca lled = fal se; | |
| 133 | vprUpd ateOpData. storeLastU pdateTime( lastUpdate TimeValue, function( error, res ponse) { | |
| 134 | actualEr ror = erro r; | |
| 135 | actualRe sponse = r esponse; | |
| 136 | called = true; | |
| 137 | }); | |
| 138 | ||
| 139 | waitsF or(functio n() { | |
| 140 | return c alled; | |
| 141 | }, 'Ca ll to stor eLastUpdat eTime fail ed to retu rn in time .', 500); | |
| 142 | ||
| 143 | runs(f unction() { | |
| 144 | expect(a ctualError ).toBeTrut hy(); | |
| 145 | expect(a ctualRespo nse).toBeN ull(); | |
| 146 | expect(j dsClientDu mmy.storeO perational DataMutabl e.calls.le ngth).toEq ual(1); | |
| 147 | expect(j dsClientDu mmy.storeO perational DataMutabl e).toHaveB eenCalledW ith(jasmin e.objectCo ntaining({ | |
| 148 | _id: vista IdValue, | |
| 149 | lastUpdate : lastUpda teTimeValu e, | |
| 150 | uid: uidVa lue | |
| 151 | }), jasm ine.any(Fu nction)); | |
| 152 | }); | |
| 153 | }); | |
| 154 | it(' Missing la st-update- time', fun ction() { | |
| 155 | var ex pectedJdsR esponse = { | |
| 156 | statusCo de: 201 | |
| 157 | }; | |
| 158 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, undefin ed); | |
| 159 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 160 | var ac tualError; | |
| 161 | var ac tualRespon se; | |
| 162 | var ca lled = fal se; | |
| 163 | vprUpd ateOpData. storeLastU pdateTime( null, func tion(error , response ) { | |
| 164 | actualEr ror = erro r; | |
| 165 | actualRe sponse = r esponse; | |
| 166 | called = true; | |
| 167 | }); | |
| 168 | ||
| 169 | waitsF or(functio n() { | |
| 170 | return c alled; | |
| 171 | }, 'Ca ll to stor eLastUpdat eTime fail ed to retu rn in time .', 500); | |
| 172 | ||
| 173 | runs(f unction() { | |
| 174 | expect(a ctualError ).toBeTrut hy(); | |
| 175 | expect(a ctualRespo nse).toBeN ull(); | |
| 176 | expect(j dsClientDu mmy.storeO perational DataMutabl e.calls.le ngth).toEq ual(0); | |
| 177 | }); | |
| 178 | }); | |
| 179 | it(' Missing vi staId', fu nction() { | |
| 180 | var ex pectedJdsR esponse = { | |
| 181 | statusCo de: 200 | |
| 182 | }; | |
| 183 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, undefin ed); | |
| 184 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, n ull, jdsCl ientDummy) ; | |
| 185 | var ac tualError; | |
| 186 | var ac tualRespon se; | |
| 187 | var ca lled = fal se; | |
| 188 | vprUpd ateOpData. storeLastU pdateTime( lastUpdate TimeValue, function( error, res ponse) { | |
| 189 | actualEr ror = erro r; | |
| 190 | actualRe sponse = r esponse; | |
| 191 | called = true; | |
| 192 | }); | |
| 193 | ||
| 194 | waitsF or(functio n() { | |
| 195 | return c alled; | |
| 196 | }, 'Ca ll to stor eLastUpdat eTime fail ed to retu rn in time .', 500); | |
| 197 | ||
| 198 | runs(f unction() { | |
| 199 | expect(a ctualError ).toBeTrut hy(); | |
| 200 | expect(a ctualRespo nse).toBeN ull(); | |
| 201 | expect(j dsClientDu mmy.storeO perational DataMutabl e.calls.le ngth).toEq ual(0); | |
| 202 | }); | |
| 203 | }); | |
| 204 | }) ; | |
| 205 | de scribe('re trieveLast UpdateTime ()', funct ion() { | |
| 206 | it(' Happy Path ', functio n() { | |
| 207 | ||
| 208 | var ex pectedJdsR esponse = { | |
| 209 | statusCo de: 200 | |
| 210 | }; | |
| 211 | var ex pectedJdsR esult = { | |
| 212 | _i d: vistaId Value, | |
| 213 | la stUpdate: lastUpdate TimeValue, | |
| 214 | ui d: uidValu e | |
| 215 | }; | |
| 216 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, expecte dJdsResult ); | |
| 217 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 218 | var ac tualError; | |
| 219 | var ac tualRespon se; | |
| 220 | var ca lled = fal se; | |
| 221 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 222 | actualEr ror = erro r; | |
| 223 | actualRe sponse = r esponse; | |
| 224 | called = true; | |
| 225 | }); | |
| 226 | ||
| 227 | waitsF or(functio n() { | |
| 228 | return c alled; | |
| 229 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 230 | ||
| 231 | runs(f unction() { | |
| 232 | expect(a ctualError ).toBeNull (); | |
| 233 | expect(a ctualRespo nse).toEqu al(lastUpd ateTimeVal ue); | |
| 234 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(1); | |
| 235 | expect(j dsClientDu mmy.getOpe rationalDa taMutable) .toHaveBee nCalledWit h(vistaIdV alue, jasm ine.any(Fu nction)); | |
| 236 | }); | |
| 237 | }); | |
| 238 | it(' Missing vi staId', fu nction() { | |
| 239 | var ex pectedJdsR esponse = { | |
| 240 | statusCo de: 200 | |
| 241 | }; | |
| 242 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, null); | |
| 243 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, n ull, jdsCl ientDummy) ; | |
| 244 | var ac tualError; | |
| 245 | var ac tualRespon se; | |
| 246 | var ca lled = fal se; | |
| 247 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 248 | actualEr ror = erro r; | |
| 249 | actualRe sponse = r esponse; | |
| 250 | called = true; | |
| 251 | }); | |
| 252 | ||
| 253 | waitsF or(functio n() { | |
| 254 | return c alled; | |
| 255 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 256 | ||
| 257 | runs(f unction() { | |
| 258 | expect(a ctualError ).toBeTrut hy(); | |
| 259 | expect(a ctualRespo nse).toBeN ull(); | |
| 260 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(0); | |
| 261 | }); | |
| 262 | }); | |
| 263 | it(' JDS return s error.', function( ) { | |
| 264 | ||
| 265 | var ex pectedJdsE rror = 'Fa iled call to JDS.'; | |
| 266 | jdsCli entDummy._ setRespons eData(expe ctedJdsErr or, null, undefined) ; | |
| 267 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 268 | var ac tualError; | |
| 269 | var ac tualRespon se; | |
| 270 | var ca lled = fal se; | |
| 271 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 272 | actualEr ror = erro r; | |
| 273 | actualRe sponse = r esponse; | |
| 274 | called = true; | |
| 275 | }); | |
| 276 | ||
| 277 | waitsF or(functio n() { | |
| 278 | return c alled; | |
| 279 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 280 | ||
| 281 | runs(f unction() { | |
| 282 | expect(a ctualError .indexOf(e xpectedJds Error)).to BeGreaterT han(-1); | |
| 283 | expect(a ctualRespo nse).toBeN ull(); | |
| 284 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(1); | |
| 285 | expect(j dsClientDu mmy.getOpe rationalDa taMutable) .toHaveBee nCalledWit h(vistaIdV alue, jasm ine.any(Fu nction)); | |
| 286 | }); | |
| 287 | }); | |
| 288 | it(' JDS return s no error and no re sponse.', function() { | |
| 289 | jdsCli entDummy._ setRespons eData(null , null, un defined); | |
| 290 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 291 | var ac tualError; | |
| 292 | var ac tualRespon se; | |
| 293 | var ca lled = fal se; | |
| 294 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 295 | actualEr ror = erro r; | |
| 296 | actualRe sponse = r esponse; | |
| 297 | called = true; | |
| 298 | }); | |
| 299 | ||
| 300 | waitsF or(functio n() { | |
| 301 | return c alled; | |
| 302 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 303 | ||
| 304 | runs(f unction() { | |
| 305 | expect(a ctualError ).toBeTrut hy(); | |
| 306 | expect(a ctualRespo nse).toBeN ull(); | |
| 307 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(1); | |
| 308 | expect(j dsClientDu mmy.getOpe rationalDa taMutable) .toHaveBee nCalledWit h(vistaIdV alue, jasm ine.any(Fu nction)); | |
| 309 | }); | |
| 310 | }); | |
| 311 | it(' JDS return s no error but respo nse is an empty obje ct (meanin g record d oes not ex ist)', fun ction() { | |
| 312 | ||
| 313 | var ex pectedJdsR esponse = { | |
| 314 | statusCo de: 200 | |
| 315 | }; | |
| 316 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, {}); | |
| 317 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 318 | var ac tualError; | |
| 319 | var ac tualRespon se; | |
| 320 | var ca lled = fal se; | |
| 321 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 322 | actualEr ror = erro r; | |
| 323 | actualRe sponse = r esponse; | |
| 324 | called = true; | |
| 325 | }); | |
| 326 | ||
| 327 | waitsF or(functio n() { | |
| 328 | return c alled; | |
| 329 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 330 | ||
| 331 | runs(f unction() { | |
| 332 | expect(a ctualError ).toBeNull (); | |
| 333 | expect(a ctualRespo nse).toEqu al('0'); | |
| 334 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(1); | |
| 335 | expect(j dsClientDu mmy.getOpe rationalDa taMutable) .toHaveBee nCalledWit h(vistaIdV alue, jasm ine.any(Fu nction)); | |
| 336 | }); | |
| 337 | }); | |
| 338 | it(' JDS return s no error but incor rect respo nse.status Code', fun ction() { | |
| 339 | var ex pectedJdsR esponse = { | |
| 340 | statusCo de: 100 | |
| 341 | }; | |
| 342 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, undefin ed); | |
| 343 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 344 | var ac tualError; | |
| 345 | var ac tualRespon se; | |
| 346 | var ca lled = fal se; | |
| 347 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 348 | actualEr ror = erro r; | |
| 349 | actualRe sponse = r esponse; | |
| 350 | called = true; | |
| 351 | }); | |
| 352 | ||
| 353 | waitsF or(functio n() { | |
| 354 | return c alled; | |
| 355 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 356 | ||
| 357 | runs(f unction() { | |
| 358 | expect(a ctualError ).toBeTrut hy(); | |
| 359 | expect(a ctualRespo nse).toBeN ull(); | |
| 360 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(1); | |
| 361 | expect(j dsClientDu mmy.getOpe rationalDa taMutable) .toHaveBee nCalledWit h(vistaIdV alue, jasm ine.any(Fu nction)); | |
| 362 | }); | |
| 363 | }); | |
| 364 | it(' JDS return s no error , response , or resul t', functi on() { | |
| 365 | jdsCli entDummy._ setRespons eData(null , null, nu ll); | |
| 366 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 367 | var ac tualError; | |
| 368 | var ac tualRespon se; | |
| 369 | var ca lled = fal se; | |
| 370 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 371 | actualEr ror = erro r; | |
| 372 | actualRe sponse = r esponse; | |
| 373 | called = true; | |
| 374 | }); | |
| 375 | ||
| 376 | waitsF or(functio n() { | |
| 377 | return c alled; | |
| 378 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 379 | ||
| 380 | runs(f unction() { | |
| 381 | expect(a ctualError ).toBeTrut hy(); | |
| 382 | expect(a ctualRespo nse).toBeN ull(); | |
| 383 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(1); | |
| 384 | expect(j dsClientDu mmy.getOpe rationalDa taMutable) .toHaveBee nCalledWit h(vistaIdV alue, jasm ine.any(Fu nction)); | |
| 385 | }); | |
| 386 | }); | |
| 387 | it(' JDS return s response - but res ponse did not have t he actual item.', fu nction() { | |
| 388 | var ex pectedJdsR esponse = { | |
| 389 | statusCo de: 200 | |
| 390 | }; | |
| 391 | var ex pectedJdsR esult = { | |
| 392 | apiVersi on: '1.0', | |
| 393 | data: { | |
| 394 | updated: ' 2014123114 4448', | |
| 395 | totalItems : 0, | |
| 396 | currentIte mCount: 0 | |
| 397 | } | |
| 398 | }; | |
| 399 | jdsCli entDummy._ setRespons eData(null , expected JdsRespons e, expecte dJdsResult ); | |
| 400 | var vp rUpdateOpD ata = new VprUpdateO pData(dumm yLogger, v istaIdValu e, jdsClie ntDummy); | |
| 401 | var ac tualError; | |
| 402 | var ac tualRespon se; | |
| 403 | var ca lled = fal se; | |
| 404 | vprUpd ateOpData. retrieveLa stUpdateTi me(functio n(error, r esponse) { | |
| 405 | actualEr ror = erro r; | |
| 406 | actualRe sponse = r esponse; | |
| 407 | called = true; | |
| 408 | }); | |
| 409 | ||
| 410 | waitsF or(functio n() { | |
| 411 | return c alled; | |
| 412 | }, 'Ca ll to retr ieveLastUp dateTime f ailed to r eturn in t ime.', 500 ); | |
| 413 | ||
| 414 | runs(f unction() { | |
| 415 | expect(a ctualError ).toBeTrut hy(); | |
| 416 | expect(a ctualRespo nse).toBeN ull(); | |
| 417 | expect(j dsClientDu mmy.getOpe rationalDa taMutable. calls.leng th).toEqua l(1); | |
| 418 | expect(j dsClientDu mmy.getOpe rationalDa taMutable) .toHaveBee nCalledWit h(vistaIdV alue, jasm ine.any(Fu nction)); | |
| 419 | }); | |
| 420 | }); | |
| 421 | }) ; | |
| 422 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.