summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-09-17 16:41:26 +0530
committerTakamune Cho <tc012c@att.com>2018-09-18 00:11:26 +0000
commit492c81c3c0ef4a8f7b688f0391dcab9cd9ed73a6 (patch)
tree1ed435f640b9aa9b878ed7d9088c997fb58f2f0b /src
parent1fe55d344c9c3f02d96c561157b035c1020f3bea (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>
Diffstat (limited to 'src')
-rw-r--r--src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts10
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');
+ }));
});