summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2020-02-27 15:12:20 +0000
committerGerrit Code Review <gerrit@onap.org>2020-02-27 15:12:20 +0000
commit0f08aea401f83dd18fe1ee8c18cfd4426576cd74 (patch)
treea3c742e5576a8b6f8cf2834fb3f55a0e694fbd3f /ecomp-sdk/epsdk-app-overlay/src/main
parent37db40a2dc6e811e919b912579fbbb2b1d8cedba (diff)
parent2334284d4c8d4edfe91e5a2276c862eedb6a1ac6 (diff)
Merge "wrote test cases for dashboard-report.service.spec.ts"
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/dashboard-report.service.spec.ts27
1 files changed, 26 insertions, 1 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/dashboard-report.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/dashboard-report.service.spec.ts
index 5c6fc2cb..1c96f7ed 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/dashboard-report.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-dashboard-report/dashboard-report.service.spec.ts
@@ -1,12 +1,37 @@
import { TestBed } from '@angular/core/testing';
import { DashboardReportService } from './dashboard-report.service';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { HttpClient } from '@angular/common/http';
+import { environment } from 'src/environments/environment';
describe('DashboardReportService', () => {
- beforeEach(() => TestBed.configureTestingModule({}));
+
+ let service: DashboardReportService;
+
+ beforeEach(() => {TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [HttpClient, HttpClientTestingModule, DashboardReportService]
+ });
+ service = TestBed.get(DashboardReportService);
+
+});
it('should be created', () => {
const service: DashboardReportService = TestBed.get(DashboardReportService);
expect(service).toBeTruthy();
});
+
+ it('should getReportData', () => {
+ service.getReportData("test").subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
+ it('should getReportDataWithFormFields', () => {
+ service.getReportDataWithFormFields("just", "test").subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
});