I changed API for dynamic unit cases

This commit is contained in:
Rajnikant 2022-05-02 16:24:47 +05:30
parent 834173201b
commit 05d980e6e3
11 changed files with 69 additions and 75 deletions

View File

@ -1,23 +1,17 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { D3MapComponent } from './d3-map.component'; import { D3MapComponent } from './d3-map.component';
describe('D3MapComponent', () => { describe('D3MapComponent', () => {
let component: D3MapComponent; let component: D3MapComponent;
let fixture: ComponentFixture<D3MapComponent>; let fixture: ComponentFixture<D3MapComponent>;
beforeEach(async(() => { beforeEach(async () => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [D3MapComponent], declarations: [D3MapComponent],
}).compileComponents(); }).compileComponents();
})); });
// beforeEach(() => { it('should create', () => {
// fixture = TestBed.createComponent(MapComponent); expect(component)
// component = fixture.componentInstance; });
// fixture.detectChanges();
// });
//
// it('should create', () => {
// expect(component).toBeTruthy();
// });
}); });

View File

@ -42,7 +42,7 @@ describe('DraggableSelectionComponent', () => {
let interfaceLabelDragEventEmitter: EventEmitter<DraggableDrag<MapLinkNode>>; let interfaceLabelDragEventEmitter: EventEmitter<DraggableDrag<MapLinkNode>>;
let interfaceLabelEndEventEmitter: EventEmitter<DraggableEnd<MapLinkNode>>; let interfaceLabelEndEventEmitter: EventEmitter<DraggableEnd<MapLinkNode>>;
beforeEach(async(() => { beforeEach(async () => {
mockedGraphDataManager = new MockedGraphDataManager(); mockedGraphDataManager = new MockedGraphDataManager();
nodesStartEventEmitter = new EventEmitter<DraggableStart<MapNode>>(); nodesStartEventEmitter = new EventEmitter<DraggableStart<MapNode>>();
@ -110,7 +110,7 @@ describe('DraggableSelectionComponent', () => {
interfaceDragged: { emit: () => {} }, interfaceDragged: { emit: () => {} },
}; };
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
providers: [ providers: [
{ provide: NodesWidget, useValue: nodesWidgetStub }, { provide: NodesWidget, useValue: nodesWidgetStub },
{ provide: DrawingsWidget, useValue: drawingsWidgetStub }, { provide: DrawingsWidget, useValue: drawingsWidgetStub },
@ -126,7 +126,7 @@ describe('DraggableSelectionComponent', () => {
], ],
declarations: [DraggableSelectionComponent], declarations: [DraggableSelectionComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(DraggableSelectionComponent); fixture = TestBed.createComponent(DraggableSelectionComponent);

View File

@ -1,15 +1,15 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DraggableComponent } from './draggable.component'; import { DraggableComponent } from './draggable.component';
describe('DraggableComponent', () => { describe('DraggableComponent', () => {
let component: DraggableComponent; let component: DraggableComponent;
let fixture: ComponentFixture<DraggableComponent>; let fixture: ComponentFixture<DraggableComponent>;
beforeEach(async(() => { beforeEach(async() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [DraggableComponent], declarations: [DraggableComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(DraggableComponent); fixture = TestBed.createComponent(DraggableComponent);
@ -17,7 +17,7 @@ describe('DraggableComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -1,15 +1,15 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import {ComponentFixture, TestBed } from '@angular/core/testing';
import { DrawingComponent } from './drawing.component'; import { DrawingComponent } from './drawing.component';
describe('DrawingComponent', () => { describe('DrawingComponent', () => {
let component: DrawingComponent; let component: DrawingComponent;
let fixture: ComponentFixture<DrawingComponent>; let fixture: ComponentFixture<DrawingComponent>;
beforeEach(async(() => { beforeEach(async() => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [DrawingComponent], declarations: [DrawingComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(DrawingComponent); fixture = TestBed.createComponent(DrawingComponent);
@ -17,7 +17,7 @@ describe('DrawingComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -1,15 +1,15 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { EllipseComponent } from './ellipse.component'; import { EllipseComponent } from './ellipse.component';
describe('EllipseComponent', () => { describe('EllipseComponent', () => {
let component: EllipseComponent; let component: EllipseComponent;
let fixture: ComponentFixture<EllipseComponent>; let fixture: ComponentFixture<EllipseComponent>;
beforeEach(async(() => { beforeEach(async() => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [EllipseComponent], declarations: [EllipseComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(EllipseComponent); fixture = TestBed.createComponent(EllipseComponent);
@ -17,7 +17,7 @@ describe('EllipseComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -5,11 +5,11 @@ describe('ImageComponent', () => {
let component: ImageComponent; let component: ImageComponent;
let fixture: ComponentFixture<ImageComponent>; let fixture: ComponentFixture<ImageComponent>;
beforeEach(async(() => { beforeEach(async () => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [ImageComponent], declarations: [ImageComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ImageComponent); fixture = TestBed.createComponent(ImageComponent);
@ -17,7 +17,7 @@ describe('ImageComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -1,15 +1,15 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import {ComponentFixture, TestBed } from '@angular/core/testing';
import { LineComponent } from './line.component'; import { LineComponent } from './line.component';
describe('LineComponent', () => { describe('LineComponent', () => {
let component: LineComponent; let component: LineComponent;
let fixture: ComponentFixture<LineComponent>; let fixture: ComponentFixture<LineComponent>;
beforeEach(async(() => { beforeEach(async() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [LineComponent], declarations: [LineComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(LineComponent); fixture = TestBed.createComponent(LineComponent);
@ -17,7 +17,7 @@ describe('LineComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -1,15 +1,15 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import {ComponentFixture, TestBed } from '@angular/core/testing';
import { RectComponent } from './rect.component'; import { RectComponent } from './rect.component';
describe('RectComponent', () => { describe('RectComponent', () => {
let component: RectComponent; let component: RectComponent;
let fixture: ComponentFixture<RectComponent>; let fixture: ComponentFixture<RectComponent>;
beforeEach(async(() => { beforeEach(async () => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [RectComponent], declarations: [RectComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(RectComponent); fixture = TestBed.createComponent(RectComponent);
@ -17,7 +17,7 @@ describe('RectComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -5,11 +5,11 @@ describe('TextComponent', () => {
let component: TextComponent; let component: TextComponent;
let fixture: ComponentFixture<TextComponent>; let fixture: ComponentFixture<TextComponent>;
beforeEach(async(() => { beforeEach(async() => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [TextComponent], declarations: [TextComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(TextComponent); fixture = TestBed.createComponent(TextComponent);
@ -17,7 +17,7 @@ describe('TextComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -1,15 +1,15 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { InterfaceLabelComponent } from './interface-label.component'; import { InterfaceLabelComponent } from './interface-label.component';
describe('InterfaceLabelComponent', () => { describe('InterfaceLabelComponent', () => {
let component: InterfaceLabelComponent; let component: InterfaceLabelComponent;
let fixture: ComponentFixture<InterfaceLabelComponent>; let fixture: ComponentFixture<InterfaceLabelComponent>;
beforeEach(async(() => { beforeEach(async() => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [InterfaceLabelComponent], declarations: [InterfaceLabelComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(InterfaceLabelComponent); fixture = TestBed.createComponent(InterfaceLabelComponent);
@ -17,7 +17,7 @@ describe('InterfaceLabelComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });

View File

@ -1,15 +1,15 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { LinkComponent } from './link.component'; import { LinkComponent } from './link.component';
describe('LinkComponent', () => { describe('LinkComponent', () => {
let component: LinkComponent; let component: LinkComponent;
let fixture: ComponentFixture<LinkComponent>; let fixture: ComponentFixture<LinkComponent>;
beforeEach(async(() => { beforeEach(async() => {
TestBed.configureTestingModule({ await TestBed.configureTestingModule({
declarations: [LinkComponent], declarations: [LinkComponent],
}).compileComponents(); }).compileComponents();
})); });
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(LinkComponent); fixture = TestBed.createComponent(LinkComponent);
@ -17,7 +17,7 @@ describe('LinkComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
}); });
// it('should create', () => { it('should create', () => {
// expect(component).toBeTruthy(); expect(component).toBeTruthy();
// }); });
}); });