From 88f1b13348515f6d32ad325a289a07bf0ba7fc27 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Tue, 31 Jul 2018 14:31:40 +0530 Subject: 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 --- .../parameter-definition.service.spec.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/app/vnfs') 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'); + })); }); -- cgit 1.2.3-korg