removed unused *.spec.ts

This commit is contained in:
Patrick Haßel 2022-10-25 12:46:13 +02:00
parent 26ac11e076
commit e5a2b36ac2
23 changed files with 6 additions and 434 deletions

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {AreaService} from './area.service';
describe('AreaService', () => {
let service: AreaService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(AreaService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {ChannelService} from './channel.service';
describe('ChannelService', () => {
let service: ChannelService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ChannelService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {DeviceService} from './device.service';
describe('DeviceService', () => {
let service: DeviceService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DeviceService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {PropertyService} from './property.service';
describe('PropertyService', () => {
let service: PropertyService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(PropertyService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {RoomService} from './room.service';
describe('RoomService', () => {
let service: RoomService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(RoomService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {SceneService} from './scene.service';
describe('SceneService', () => {
let service: SceneService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(SceneService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {ScheduleEntryService} from './schedule-entry.service';
describe('ScheduleEntryService', () => {
let service: ScheduleEntryService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ScheduleEntryService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {ScheduleService} from './schedule.service';
describe('ScheduleService', () => {
let service: ScheduleService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ScheduleService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,6 +1,8 @@
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {ApiService, NO_OP} from "../api.service"; import {ApiService, NO_OP} from "../api.service";
import {Schedule} from "./Schedule"; import {Schedule} from "./Schedule";
import {Next} from "../types";
import {Update} from "../Update";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@ -33,4 +35,8 @@ export class ScheduleService {
this.api.getReturnItem("schedule/delete/" + schedule.id, _ => _, next, error); this.api.getReturnItem("schedule/delete/" + schedule.id, _ => _, next, error);
} }
subscribe(next: Next<Update<Schedule>>): void {
this.api.subscribe("ScheduleDto", Schedule.fromJson, next);
}
} }

View File

@ -1,16 +0,0 @@
import {TestBed} from '@angular/core/testing';
import {DataService} from './data.service';
describe('DataService', () => {
let service: DataService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DataService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -1,5 +1,4 @@
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {Schedule} from "./api/schedule/Schedule";
import {Device} from "./api/device/Device"; import {Device} from "./api/device/Device";
@Injectable({ @Injectable({
@ -7,16 +6,6 @@ import {Device} from "./api/device/Device";
}) })
export class DataService { export class DataService {
private _schedule?: Schedule;
get schedule(): Schedule | undefined {
return this._schedule;
}
set schedule(schedule: Schedule | undefined) {
this._schedule = schedule;
}
private _device?: Device; private _device?: Device;
get device(): Device | undefined { get device(): Device | undefined {

View File

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

View File

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

View File

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

View File

@ -1,25 +0,0 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {DeviceAllListComponent} from './device-all-list.component';
describe('DeviceAllListComponent', () => {
let component: DeviceAllListComponent;
let fixture: ComponentFixture<DeviceAllListComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [DeviceAllListComponent]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(DeviceAllListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,6 @@ import {ScheduleEntry} from "../../api/schedule/entry/ScheduleEntry";
import {ScheduleEntryService} from "../../api/schedule/entry/schedule-entry.service"; import {ScheduleEntryService} from "../../api/schedule/entry/schedule-entry.service";
import {faCheckCircle, faCircle, faTimesCircle} from '@fortawesome/free-regular-svg-icons'; import {faCheckCircle, faCircle, faTimesCircle} from '@fortawesome/free-regular-svg-icons';
import {ActivatedRoute} from "@angular/router"; import {ActivatedRoute} from "@angular/router";
import {DataService} from "../../data.service";
import {PropertyService} from "../../api/property/property.service"; import {PropertyService} from "../../api/property/property.service";
import {Scene} from "../../api/scene/Scene"; import {Scene} from "../../api/scene/Scene";
import {SceneService} from "../../api/scene/scene.service"; import {SceneService} from "../../api/scene/scene.service";
@ -37,20 +36,17 @@ export class ScheduleComponent implements OnInit {
readonly propertyService: PropertyService, readonly propertyService: PropertyService,
readonly bulkService: BulkService, readonly bulkService: BulkService,
readonly sceneService: SceneService, readonly sceneService: SceneService,
readonly dataService: DataService,
) { ) {
// nothing // nothing
} }
ngOnInit(): void { ngOnInit(): void {
this.dataService.schedule = undefined;
this.sceneService.findAll(scenes => this.scenes = scenes); this.sceneService.findAll(scenes => this.scenes = scenes);
this.activatedRoute.params.subscribe(params => this.scheduleService.getById(params['id'], schedule => this.setSchedule(schedule))); this.activatedRoute.params.subscribe(params => this.scheduleService.getById(params['id'], schedule => this.setSchedule(schedule)));
} }
private setSchedule(schedule: Schedule): void { private setSchedule(schedule: Schedule): void {
this.schedule = schedule; this.schedule = schedule;
this.dataService.schedule = schedule;
} }
set(entry: ScheduleEntry | null, key: string, value: any): void { set(entry: ScheduleEntry | null, key: string, value: any): void {