summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-07-31 14:31:40 +0530
committerTakamune Cho <tc012c@att.com>2018-08-02 19:54:37 +0000
commit88f1b13348515f6d32ad325a289a07bf0ba7fc27 (patch)
tree8fc9072c3b573bbcdb3124006b0dbed283e6336c /src
parent50883a6d3cb0ce19febbcacb53cbd493e895d098 (diff)
Test Case - Paramete-definitions.service
Wrote test case to cover setValues method pf parameter-definitions service Issue-ID: APPC-1064 Change-Id: I5e43aba3c6af733cf20922036ef7ad09b86a7cdd Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.spec.ts15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.spec.ts b/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.spec.ts
index a629bcf..68caaf0 100644
--- a/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.spec.ts
+++ b/src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.spec.ts
@@ -2,6 +2,8 @@
============LICENSE_START==========================================
===================================================================
Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+
+Modification Copyright (C) 2018 IBM.
===================================================================
Unless otherwise specified, all software contained herein is licensed
@@ -125,10 +127,17 @@ describe('ParameterDefinitionService', () => {
service.downloadDataObject = {pd:{pdData:"", pdFileName:""}};
service.destroy(displayParamObjects);
expect(mappingEditorService.downloadDataObject.pd.pdData).toEqual(expectedPDdata);
- //expect(mappingEditorService.appDataObject.pd).toEqual(expectedAppData);
-
-
+ //expect(mappingEditorService.appDataObject.pd).toEqual(expectedAppData);
+
}));
+ it('should test setValues method', inject([ParameterDefinitionService, ParamShareService, MappingEditorService], (service: ParameterDefinitionService, paramShareService: ParamShareService, mappingEditorService: MappingEditorService)=>{
+ service.setValues('vnfType-1', 'vnfcType-1', 'deviceProtocol', 'config', 'artifact-name');
+ expect(service.vnfType).toBe('vnfType-1');
+ expect(service.vnfcType).toBe('vnfcType-1');
+ expect(service.protocol).toBe('deviceProtocol');
+ expect(service.action).toBe('config');
+ expect(service.artifact_fileName).toBe('artifact-name');
+ }));
});