| /* tslint:disable:no-unused-variable */ |
| |
| import { TestBed, async, inject } from '@angular/core/testing'; |
| import { BaseHttpService } from './base-http.service'; |
| import { SessionContext } from '../common/session-context'; |
| import { Globals } from '../common/globals'; |
| import { MessageService } from '../services/message.service'; |
| describe('BaseHttpService', () => { |
| const _sc: SessionContext = new SessionContext(); |
| class BaseHttpServiceMock extends BaseHttpService { |
| public constructor( public messageService: MessageService ) { |
| super(messageService ); |
| } |
| public getBaseUrl(): string { |
| return super.getBaseUrl(); |
| } |
| } |
| |
| beforeEach(() => { |
| TestBed.configureTestingModule({ |
| providers: [BaseHttpService] |
| }); |
| |
| it( 'should deliver the BaseUrl', () => { |
| const bhs = new BaseHttpServiceMock(this.messageService); |
| expect( bhs.getBaseUrl()).toBe(Globals.BASE_URL); |
| }); |
| }); |
| |
| |
| }); |