aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/typeNodeInformation.model.spec.ts
blob: a6d3b5398805d77d6d4eaaf90251eacce82f2dea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import {TestBed, getTestBed} from '@angular/core/testing';
import {
  HttpClientTestingModule,
} from '@angular/common/http/testing';
import {TypeNodeInformation} from "./typeNodeInformation.model";

describe('Available Models Tree Service', () => {
  let injector;
  beforeEach(() => {

    TestBed.configureTestingModule({
      imports: [HttpClientTestingModule],
      providers: []
    }).compileComponents();

    injector = getTestBed();
  });


  test('TypeNodeInformation VNF', () => {
    let type: TypeNodeInformation = new TypeNodeInformation(<any>{
      data: {
        type: 'VF'
      }
    });
    expect(type.hierarchyName).toEqual('vnfs');
    expect(type.existingMappingCounterName).toEqual('existingVNFCounterMap');
  });

  test('TypeNodeInformation VNF group', () => {
    let type: TypeNodeInformation = new TypeNodeInformation(<any>{
      data: {
        type: 'VnfGroup'
      }
    });
    expect(type.hierarchyName).toEqual('vnfGroups');
    expect(type.existingMappingCounterName).toEqual('existingVnfGroupCounterMap');
  });

  test('TypeNodeInformation VL', () => {
    let type: TypeNodeInformation = new TypeNodeInformation(<any>{
      data: {
        type: 'VL'
      }
    });
    expect(type.hierarchyName).toEqual('networks');
    expect(type.existingMappingCounterName).toEqual('existingNetworksCounterMap');
  });

  test('TypeNodeInformation Network', () => {
    let type: TypeNodeInformation = new TypeNodeInformation(<any>{
      data: {
        type: 'Network'
      }
    });
    expect(type.hierarchyName).toEqual('networks');
    expect(type.existingMappingCounterName).toEqual('existingNetworksCounterMap');
  });
});