Produced by Araxis Merge on 10/31/2017 11:27:24 PM Eastern 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 | OSCIF_MCCF EDI TAS_TASCore_v1.00.00_iter1_October_2017.zip\OSCIF_MCCF EDI TAS_TASCore_v1.00.00_iter1_October_2017\src\app\core\error-messages | error.service.spec.ts | Sat Oct 7 07:37:08 2017 UTC |
| 2 | OSCIF_MCCF EDI TAS_TASCore_v1.00.00_iter1_October_2017.zip\OSCIF_MCCF EDI TAS_TASCore_v1.00.00_iter1_October_2017\src\app\core\error-messages | error.service.spec.ts | Tue Oct 31 19:48:24 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 170 |
| Changed | 1 | 2 |
| 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 | import { T estBed, in ject } fro m '@angula r/core/tes ting'; | |
| 2 | import { M ockBackend , MockConn ection } f rom '@angu lar/http/t esting'; | |
| 3 | import { H ttp, BaseR equestOpti ons, Respo nse, Respo nseOptions , RequestM ethod } fr om '@angul ar/http'; | |
| 4 | ||
| 5 | import { E rrorServic e } from ' ./error.se rvice'; | |
| 6 | ||
| 7 | describe(' ErrorServi ce', funct ion () { | |
| 8 | let serv ice: Error Service; | |
| 9 | let back end: MockB ackend; | |
| 10 | ||
| 11 | beforeEa ch(functio n () { | |
| 12 | ||
| 13 | TestBe d.configur eTestingMo dule({ | |
| 14 | prov iders: [ | |
| 15 | Er rorService , | |
| 16 | Mo ckBackend, | |
| 17 | Ba seRequestO ptions, | |
| 18 | { | |
| 19 | provide: H ttp, | |
| 20 | useFactory : function (mockBack end, defau ltOptions) { | |
| 21 | return n ew Http(mo ckBackend, defaultOp tions); | |
| 22 | }, | |
| 23 | deps: [Moc kBackend, BaseReques tOptions] | |
| 24 | } | |
| 25 | ] | |
| 26 | }); | |
| 27 | ||
| 28 | }); | |
| 29 | ||
| 30 | beforeEa ch(inject( [ErrorServ ice, MockB ackend], f unction (E rrorServic e, mockBac kend) { | |
| 31 | servic e = ErrorS ervice; | |
| 32 | backen d = mockBa ckend; | |
| 33 | })); | |
| 34 | ||
| 35 | ||
| 36 | it('shou ld create' , function (done) { | |
| 37 | ||
| 38 | backen d.connecti ons.subscr ibe(functi on (connec tion: Mock Connection ) { | |
| 39 | ||
| 40 | let options = new Respon seOptions( { | |
| 41 | bo dy: { | |
| 42 | 'errors': [ | |
| 43 | { | |
| 44 | 'error Code': 'HT TP 777', | |
| 45 | 'error MessageUse r': 'You a re very lu cky', | |
| 46 | 'error MessageTec hnical': ' Lucky Seve ns' | |
| 47 | } | |
| 48 | ], | |
| 49 | 'contacts' : [ | |
| 50 | { | |
| 51 | 'appli cation': ' eBilling', | |
| 52 | 'conta ct': { | |
| 53 | 'nam e': 'Edwar d Billings ', | |
| 54 | 'email': PII ' | |
| 55 | } | |
| 56 | } | |
| 57 | ] | |
| 58 | } | |
| 59 | ||
| 60 | }); | |
| 61 | conn ection.moc kRespond(n ew Respons e(options) ); | |
| 62 | }); | |
| 63 | ||
| 64 | servic e.setError Code('777' , 'stack trace: 019 2108 error at 801298 312. Would you like to play a game?') | |
| 65 | //.sub scribe(fun ction(resp onse) { | |
| 66 | // expect(re sponse).to .be.an('ob ject'); | |
| 67 | // expect(re sponse.mes sageUser). toEqual('Y ou are ver y lucky'); | |
| 68 | // expect(re sponse.con tactName). toEqual('E dward Bill ings'); | |
| 69 | // }, | |
| 70 | // function( e) { | |
| 71 | // console .log(' ERR OR:'+e); | |
| 72 | // } | |
| 73 | //) | |
| 74 | ||
| 75 | expect (service). toEqual(ja smine.any( Object)); | |
| 76 | ||
| 77 | done() ; | |
| 78 | }); | |
| 79 | ||
| 80 | afterEac h(function () { | |
| 81 | TestBe d.resetTes tingModule (); | |
| 82 | }); | |
| 83 | ||
| 84 | ||
| 85 | ||
| 86 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.