Test Case - Paramete-definitions.service 93/58193/3
authorArundathi Patil <arundpil@in.ibm.com>
Tue, 31 Jul 2018 09:01:40 +0000 (14:31 +0530)
committerTakamune Cho <tc012c@att.com>
Thu, 2 Aug 2018 19:54:37 +0000 (19:54 +0000)
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>
src/app/vnfs/build-artifacts/parameter-definitions/parameter-definition.service.spec.ts

index a629bcf..68caaf0 100644 (file)
@@ -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');
+    }));
 
 });