From: Arundathi Patil Date: Fri, 31 Aug 2018 16:16:20 +0000 (+0530) Subject: utility.service- added test case X-Git-Tag: 1.4.0~28 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=c3c51c9d900ce0fea0e852ed4b2ca3c792c2e6cc;p=appc%2Fcdt.git utility.service- added test case Added test case to test and cover processApiError() function. Issue-ID: APPC-1064 Change-Id: I2a6e4a131853bb36d54e40bfe38766b5e62d59b6 Signed-off-by: Arundathi Patil --- diff --git a/src/app/shared/services/utilityService/utility.service.spec.ts b/src/app/shared/services/utilityService/utility.service.spec.ts index d865f04..c0cdb13 100644 --- a/src/app/shared/services/utilityService/utility.service.spec.ts +++ b/src/app/shared/services/utilityService/utility.service.spec.ts @@ -103,4 +103,11 @@ describe('UtilityService', () => { let traceValue = localStorage.getItem("Tracelvl"); expect(traceValue).toBe("0") })); + + it('should test processApiError function', inject([UtilityService], (service: UtilityService) => { + let spy = spyOn(NotificationsService.prototype, 'error'); + service.processApiError(); + expect(spy).toHaveBeenCalled(); + + })); }); \ No newline at end of file