Wrote test case to test tlPlus and tlMinus functions to call setTraceVl
function of utility service based on the trace value stored in local
storage.
Issue-ID: APPC-1064
Change-Id: Ie93e48bb6ee6df35bbd175e15fda56060ac3c539
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
component.tlMinus();
expect(spy1).toHaveBeenCalled();
}));
+
+ it('should test tlPlus function to call setTracelvl ', inject([UtilityService], (utilService: UtilityService) => {
+ let spy1 = spyOn(UtilityService.prototype, 'setTracelvl');
+ component.tlPlus();
+ expect(spy1).toHaveBeenCalled();
+ }));
+
+ it('should test tlMinus function to call setTracelvl', inject([UtilityService], (utilService: UtilityService) => {
+ let spy1 = spyOn(UtilityService.prototype, 'setTracelvl');
+ let trv = 4;
+ localStorage["Tracelvl"] = trv;
+ component.tlMinus();
+ expect(spy1).toHaveBeenCalled();
+ }));
});