From df84398e0856c9a626f25c80aa8c1b23d8bbca51 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Thu, 6 Sep 2018 16:06:50 +0530 Subject: reference-dataform.util - added spec file wrote test case for reference-dataform.util service Issue-ID: APPC-1064 Change-Id: I9a2fe38107f7305979ed1997087eab20efadb53e Signed-off-by: Arundathi Patil --- .../reference-dataform.util.spec.ts | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts (limited to 'src/app/vnfs/build-artifacts') diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts new file mode 100644 index 0000000..d2ad4c4 --- /dev/null +++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts @@ -0,0 +1,50 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +============LICENSE_END============================================ +*/ + +import { inject, TestBed } from '@angular/core/testing'; +import { BaseRequestOptions, Response, ResponseOptions, Http } from '@angular/http'; +import { MockBackend, MockConnection } from '@angular/http/testing'; +import { HttpClientModule } from '@angular/common/http'; +import { ReferenceDataFormUtil } from './reference-dataform.util'; +import { NotificationsService } from 'angular2-notifications'; +import { UtilityService } from '../../../shared/services/utilityService/utility.service'; +import { HttpUtilService } from '../../../shared/services/httpUtil/http-util.service'; + +fdescribe('ReferenceDataFormUtil', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientModule], + providers: [ReferenceDataFormUtil, HttpUtilService, NotificationsService, UtilityService, BaseRequestOptions, MockBackend, + { + provide: Http, + useFactory: (backend: MockBackend, defaultOptions: BaseRequestOptions) => { + return new Http(backend, defaultOptions); + }, + deps: [MockBackend, BaseRequestOptions], + }] + }); + }); + + it('should ...', inject([ReferenceDataFormUtil], (service: ReferenceDataFormUtil) => { + expect(service).toBeTruthy(); + })); +}); -- cgit 1.2.3-korg