reference-dataform.util - added spec file 75/64975/2
authorArundathi Patil <arundpil@in.ibm.com>
Thu, 6 Sep 2018 10:36:50 +0000 (16:06 +0530)
committerTakamune Cho <tc012c@att.com>
Thu, 6 Sep 2018 15:07:28 +0000 (15:07 +0000)
wrote test case for reference-dataform.util service

Issue-ID: APPC-1064
Change-Id: I9a2fe38107f7305979ed1997087eab20efadb53e
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts [new file with mode: 0644]

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 (file)
index 0000000..d2ad4c4
--- /dev/null
@@ -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();
+    }));
+});