/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { of } from 'rxjs';
import { ModalComponent } from '../modal-window/modal.component';
import { BciImprintComponent } from './bci-imprint.component';
import { BCI_IMPRINT_INTL_PROVIDER } from './imprint-intl';

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

  beforeEach(
    waitForAsync(() => {
      TestBed.configureTestingModule({
        imports: [MatDialogModule, HttpClientTestingModule, RouterTestingModule, BrowserAnimationsModule],
        declarations: [BciImprintComponent, ModalComponent],
        providers: [
          BCI_IMPRINT_INTL_PROVIDER,
          {
            provide: MatDialogRef,
            useValue: {
              _containerInstance: {
                _config: {},
              },
              // eslint-disable-next-line no-empty-function
              close: () => {},
              backdropClick: () => of(''),
              keydownEvents: () => of(''),
            },
          },
        ],
      }).compileComponents();
    })
  );

  beforeEach(() => {
    fixture = TestBed.createComponent(BciImprintComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

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