subsystem-item.component.spec.ts 1.19 KB
Newer Older
Vitali Stupin's avatar
Initial    
Vitali Stupin committed
1
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
Vitali Stupin's avatar
Vitali Stupin committed
2
3
import { TranslateModule } from '@ngx-translate/core';
import { HttpClientModule } from '@angular/common/http';
Vitali Stupin's avatar
Initial    
Vitali Stupin committed
4
import { SubsystemItemComponent } from './subsystem-item.component';
Vitali Stupin's avatar
Vitali Stupin committed
5
import { RouterTestingModule } from '@angular/router/testing';
Vitali Stupin's avatar
Initial    
Vitali Stupin committed
6
7
8
9
10
11
12

describe('SubsystemItemComponent', () => {
  let component: SubsystemItemComponent;
  let fixture: ComponentFixture<SubsystemItemComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
Vitali Stupin's avatar
Vitali Stupin committed
13
      declarations: [
Vitali Stupin's avatar
Vitali Stupin committed
14
        SubsystemItemComponent
Vitali Stupin's avatar
Vitali Stupin committed
15
16
17
18
19
20
      ],
      imports: [
        TranslateModule.forRoot(),
        HttpClientModule,
        RouterTestingModule
      ]
Vitali Stupin's avatar
Initial    
Vitali Stupin committed
21
22
23
24
25
26
27
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(SubsystemItemComponent);
    component = fixture.componentInstance;
Vitali Stupin's avatar
Vitali Stupin committed
28
29

    component.subsystem = {
Vitali Stupin's avatar
Vitali Stupin committed
30
31
32
33
34
35
      xRoadInstance: 'XRD',
      memberClass: 'CLASS',
      memberCode: 'CODE',
      subsystemCode: 'SUB',
      subsystemStatus: 'OK',
      fullSubsystemName: 'XRD/CLASS/CODE/SUB',
Vitali Stupin's avatar
Vitali Stupin committed
36
      methods: []
Vitali Stupin's avatar
Vitali Stupin committed
37
    };
Vitali Stupin's avatar
Vitali Stupin committed
38

Vitali Stupin's avatar
Initial    
Vitali Stupin committed
39
40
41
42
43
44
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
Vitali Stupin's avatar
Vitali Stupin committed
45
});