summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-02-26 16:08:21 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-02-26 16:08:25 +0530
commit90c70e89f3756599e9332d1112a044244315cd4a (patch)
tree737095d1035f59d52de89d94c656eb0be53fa16e /ecomp-sdk/epsdk-app-overlay/src/main/webapp
parent5c1447aec84394049c8be95cafd59b07d96e51f2 (diff)
wrote test cases for sql.service.spec.ts
Written test cases for sql service class Issue-ID: PORTAL-834 Change-Id: I101212154375eefef05c53995b6f32bf4e130486 Signed-off-by: Rupinder<rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.service.spec.ts29
1 files changed, 25 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.service.spec.ts
index 57db6fb6..68978d90 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/sql/sql.service.spec.ts
@@ -2,15 +2,36 @@ import { TestBed } from '@angular/core/testing';
import { SqlService } from './sql.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { HttpClient } from '@angular/common/http';
+import { environment } from 'src/environments/environment';
describe('SqlService', () => {
- beforeEach(() =>
- TestBed.configureTestingModule({
- imports: [HttpClientTestingModule]
- }));
+
+ let service: SqlService;
+
+ beforeEach(() => {TestBed.configureTestingModule({
+ imports: [HttpClientTestingModule],
+ providers: [SqlService, HttpClient, HttpClientTestingModule]
+ })
+ service = TestBed.get(SqlService);
+});
it('should be created', () => {
const service: SqlService = TestBed.get(SqlService);
expect(service).toBeTruthy();
});
+
+ it('should getSQLTabData', () => {
+ service.getSQLTabData("test").subscribe((res) => {
+ expect(res).toBe(environment);
+ });
+ });
+
+ it('should postSQLValidateAndSave', () => {
+ service.postSQLValidateAndSave("test").subscribe((res) => {
+ expect(res).toBe(environment)
+ });
+ });
+
+
});