mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-01-19 03:06:31 +00:00
Update topology-summary.component.spec.ts
This commit is contained in:
parent
1b4d4d2837
commit
eba1e07a0f
@ -6,13 +6,14 @@ import { MatTableModule, MatTooltipModule, MatIconModule, MatSortModule, MatDial
|
|||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { MockedNodesDataSource } from '../project-map/project-map.component.spec';
|
import { MockedNodesDataSource, MockedLinksDataSource } from '../project-map/project-map.component.spec';
|
||||||
import { NodesDataSource } from '../../cartography/datasources/nodes-datasource';
|
import { NodesDataSource } from '../../cartography/datasources/nodes-datasource';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { Project } from '../../models/project';
|
import { Project } from '../../models/project';
|
||||||
import { Node } from '../../cartography/models/node';
|
import { Node } from '../../cartography/models/node';
|
||||||
import { Server } from '../../models/server';
|
import { Server } from '../../models/server';
|
||||||
import { ComputeService } from '../../services/compute.service';
|
import { ComputeService } from '../../services/compute.service';
|
||||||
|
import { LinksDataSource } from '../../cartography/datasources/links-datasource';
|
||||||
|
|
||||||
export class MockedComputeService {
|
export class MockedComputeService {
|
||||||
getComputes(server: Server) {
|
getComputes(server: Server) {
|
||||||
@ -26,6 +27,7 @@ describe('TopologySummaryComponent', () => {
|
|||||||
let mockedProjectService: MockedProjectService = new MockedProjectService();
|
let mockedProjectService: MockedProjectService = new MockedProjectService();
|
||||||
let mockedNodesDataSource: MockedNodesDataSource = new MockedNodesDataSource();
|
let mockedNodesDataSource: MockedNodesDataSource = new MockedNodesDataSource();
|
||||||
let mockedComputeService: MockedComputeService = new MockedComputeService();
|
let mockedComputeService: MockedComputeService = new MockedComputeService();
|
||||||
|
let mockedLinksDataSource: MockedLinksDataSource = new MockedLinksDataSource();
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
@ -41,7 +43,8 @@ describe('TopologySummaryComponent', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
{ provide: ProjectService, useValue: mockedProjectService },
|
{ provide: ProjectService, useValue: mockedProjectService },
|
||||||
{ provide: NodesDataSource, useValue: mockedNodesDataSource },
|
{ provide: NodesDataSource, useValue: mockedNodesDataSource },
|
||||||
{ provide: ComputeService, useValue: mockedComputeService}
|
{ provide: ComputeService, useValue: mockedComputeService},
|
||||||
|
{ provide: LinksDataSource, useValue: mockedLinksDataSource }
|
||||||
],
|
],
|
||||||
declarations: [TopologySummaryComponent],
|
declarations: [TopologySummaryComponent],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
|
Loading…
Reference in New Issue
Block a user