From 492c81c3c0ef4a8f7b688f0391dcab9cd9ed73a6 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Mon, 17 Sep 2018 16:41:26 +0530 Subject: reference-dataform.util.spec- added test case wrote test case to test and cover decideExtension() function. Issue-ID: APPC-1064 Change-Id: I7b31cc1a26cab9d7c9a43d1b3add5b0a5fed6b03 Signed-off-by: Arundathi Patil --- .../reference-dataform/reference-dataform.util.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/app/vnfs') diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts index aa7fbfa..7745035 100644 --- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts +++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts @@ -71,4 +71,14 @@ describe('ReferenceDataFormUtil', () => { expect(returnValueVnfcType).toBe(true); expect(returnValueVnfcTypeList).toBe(true); })); + + it('should test decideExtension function when device-protocol is CLI', inject([ReferenceDataFormUtil], (service: ReferenceDataFormUtil) => { + let extension = service.decideExtension({'device-protocol': 'CLI'}); + expect(extension).toBe('.json'); + })); + + it('should test decideExtension function when device-protocol is NETCONF-XML', inject([ReferenceDataFormUtil], (service: ReferenceDataFormUtil) => { + let extension = service.decideExtension({'device-protocol': 'NETCONF-XML'}); + expect(extension).toBe('.xml'); + })); }); -- cgit 1.2.3-korg