diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-09-17 16:41:26 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-09-18 00:11:26 +0000 |
commit | 492c81c3c0ef4a8f7b688f0391dcab9cd9ed73a6 (patch) | |
tree | 1ed435f640b9aa9b878ed7d9088c997fb58f2f0b | |
parent | 1fe55d344c9c3f02d96c561157b035c1020f3bea (diff) |
reference-dataform.util.spec- added test case1.4.0
wrote test case to test and cover decideExtension() function.
Issue-ID: APPC-1064
Change-Id: I7b31cc1a26cab9d7c9a43d1b3add5b0a5fed6b03
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r-- | src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts | 10 |
1 files changed, 10 insertions, 0 deletions
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'); + })); }); |