merge from ecomp a88f0072 - Modern UI
[vid.git] / vid-webpack-master / src / app / drawingBoard / service-planning / typeNodeInformation.model.spec.ts
1 import {TestBed, getTestBed} from '@angular/core/testing';
2 import {
3   HttpClientTestingModule,
4 } from '@angular/common/http/testing';
5 import {TypeNodeInformation} from "./typeNodeInformation.model";
6
7 describe('Available Models Tree Service', () => {
8   let injector;
9   beforeEach(() => {
10
11     TestBed.configureTestingModule({
12       imports: [HttpClientTestingModule],
13       providers: []
14     }).compileComponents();
15
16     injector = getTestBed();
17   });
18
19
20   test('TypeNodeInformation VNF', () => {
21     let type: TypeNodeInformation = new TypeNodeInformation(<any>{
22       data: {
23         type: 'VF'
24       }
25     });
26     expect(type.hierarchyName).toEqual('vnfs');
27     expect(type.existingMappingCounterName).toEqual('existingVNFCounterMap');
28   });
29
30   test('TypeNodeInformation VNF group', () => {
31     let type: TypeNodeInformation = new TypeNodeInformation(<any>{
32       data: {
33         type: 'VnfGroup'
34       }
35     });
36     expect(type.hierarchyName).toEqual('vnfGroups');
37     expect(type.existingMappingCounterName).toEqual('existingVnfGroupCounterMap');
38   });
39
40   test('TypeNodeInformation VL', () => {
41     let type: TypeNodeInformation = new TypeNodeInformation(<any>{
42       data: {
43         type: 'VL'
44       }
45     });
46     expect(type.hierarchyName).toEqual('networks');
47     expect(type.existingMappingCounterName).toEqual('existingNetworksCounterMap');
48   });
49
50   test('TypeNodeInformation Network', () => {
51     let type: TypeNodeInformation = new TypeNodeInformation(<any>{
52       data: {
53         type: 'Network'
54       }
55     });
56     expect(type.hierarchyName).toEqual('networks');
57     expect(type.existingMappingCounterName).toEqual('existingNetworksCounterMap');
58   });
59 });