Decouple runtime domain services

This commit is contained in:
Julian Appel 2026-07-26 12:04:50 +02:00
parent 0cedeaa959
commit c1be85e408
9 changed files with 103 additions and 35 deletions

View file

@ -7,7 +7,7 @@ describe("circuit numbering service", () => {
const service = new CircuitNumberingService({
sectionRepository: {
async findById() {
return { id: "s1", prefix: "-2F" } as never;
return { prefix: "-2F" };
},
},
circuitRepository: {
@ -18,7 +18,7 @@ describe("circuit numbering service", () => {
{ equipmentIdentifier: "-2F5" },
{ equipmentIdentifier: "-2FX" },
{ equipmentIdentifier: "-1F9" },
] as never[];
];
},
},
});

View file

@ -59,12 +59,12 @@ function createService() {
const service = new ProjectDeviceSyncService({
projectDeviceRepository: {
async findById() {
return projectDevice() as never;
return projectDevice();
},
},
deviceRowRepository: {
async listLinkedByProjectDevice() {
return rows as never;
return rows;
},
},
});