import { async, ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { DebugElement } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { ScanningDetailResult, VulnerabilitySeverity } from '../service/index';

import { ResultTipComponent } from './result-tip.component';
import { SharedModule } from '../shared/shared.module';

describe('ResultTipComponent (inline template)', () => {
  let component: ResultTipComponent;
  let fixture: ComponentFixture<ResultTipComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        SharedModule
      ],
      declarations: [ResultTipComponent]
    });

  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(ResultTipComponent);
    component = fixture.componentInstance;
    component.percent = 50;

    fixture.detectChanges();
  });

  it('should be created', () => {
    expect(component).toBeTruthy();
    expect(component.severity).toEqual(VulnerabilitySeverity.UNKNOWN);
  });

});
