From 68e72034de5bf5e57b699daa08fb372dc8e9567c Mon Sep 17 00:00:00 2001
From: Martin <git@mail.de>
Date: Thu, 20 Mar 2025 16:52:18 +0100
Subject: [PATCH] OZG-7501 adjust missing renaming in tests

---
 .../src/lib/bescheid.service.spec.ts          | 59 ++++++++++++++++---
 .../src/lib/bescheid.service.ts               |  4 +-
 .../kommentar-form.component.spec.ts          |  8 +--
 ...ist-in-vorgang-container.component.spec.ts |  6 +-
 ...fach-mail-list-container.component.spec.ts |  6 +-
 ...ist-in-vorgang-container.component.spec.ts |  6 +-
 6 files changed, 67 insertions(+), 22 deletions(-)

diff --git a/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.spec.ts b/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.spec.ts
index d22faf648e..ae974499af 100644
--- a/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.spec.ts
+++ b/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.spec.ts
@@ -21,10 +21,31 @@
  * Die sprachspezifischen Genehmigungen und Beschränkungen
  * unter der Lizenz sind dem Lizenztext zu entnehmen.
  */
-import { BinaryFileListLinkRel, BinaryFileListResource, BinaryFileResource, BinaryFileService, } from '@alfa-client/binary-file-shared';
-import { CommandOrder, CommandResource, CommandResourceService, CommandService, CreateCommandProps, getEffectedResourceUrl, } from '@alfa-client/command-shared';
+import {
+  BinaryFileListLinkRel,
+  BinaryFileListResource,
+  BinaryFileResource,
+  BinaryFileService,
+} from '@alfa-client/binary-file-shared';
+import {
+  CommandOrder,
+  CommandResource,
+  CommandResourceService,
+  CommandService,
+  CreateCommandProps,
+  getEffectedResourceUrl,
+} from '@alfa-client/command-shared';
 import { PostfachService } from '@alfa-client/postfach-shared';
-import { createEmptyStateResource, createErrorStateResource, createStateResource, EMPTY_STRING, getEmbeddedResources, ResourceListService, ResourceRepository, StateResource, } from '@alfa-client/tech-shared';
+import {
+  createEmptyStateResource,
+  createErrorStateResource,
+  createStateResource,
+  EMPTY_STRING,
+  getEmbeddedResources,
+  ResourceListService,
+  ResourceRepository,
+  StateResource,
+} from '@alfa-client/tech-shared';
 import { Mock, mock } from '@alfa-client/test-utils';
 import { VorgangCommandService, VorgangService, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
 import { TestBed } from '@angular/core/testing';
@@ -35,19 +56,43 @@ import { createProblemDetail } from 'libs/tech-shared/test/error';
 import { createVorgangWithEingangResource } from 'libs/vorgang-shared/test/vorgang';
 import { EMPTY, Observable, of } from 'rxjs';
 import { createBinaryFileListResource, createBinaryFileResource } from '../../../binary-file-shared/test/binary-file';
-import { createCommandErrorStateResource, createCommandResource, createCommandStateResource, createCreateCommandProps, createSuccessfullyDoneCommandStateResource, } from '../../../command-shared/test/command';
+import {
+  createCommandErrorStateResource,
+  createCommandResource,
+  createCommandStateResource,
+  createCreateCommandProps,
+  createSuccessfullyDoneCommandStateResource,
+} from '../../../command-shared/test/command';
 import { createFile } from '../../../tech-shared/test/file';
 import { singleCold, singleColdCompleted } from '../../../tech-shared/test/marbles';
 import { createBescheid, createBescheidDocument, createBescheidListResource, createBescheidResource } from '../test/bescheid';
 import { createDocumentResource } from '../test/document';
 import { BescheidFacade } from './+state/bescheid.facade';
 import { BescheidLinkRel } from './bescheid.linkrel';
-import { Bescheid, BESCHEID_UPLOADED_ATTACHMENTS, BescheidDocument, BescheidListResource, BescheidResource, BescheidStatus, BescheidWizardStep, createEmptyBescheidDocument, createEmptyUploadInProgress, createInitialWizard, } from './bescheid.model';
+import {
+  Bescheid,
+  BESCHEID_UPLOADED_ATTACHMENTS,
+  BescheidDocument,
+  BescheidListResource,
+  BescheidResource,
+  BescheidStatus,
+  BescheidWizardStep,
+  createEmptyBescheidDocument,
+  createEmptyUploadInProgress,
+  createInitialWizard,
+} from './bescheid.model';
 import { BescheidService } from './bescheid.service';
 import { DocumentLinkRel } from './document.linkrel';
 import { DocumentResource } from './document.model';
 
-import { BescheidListResourceService, BescheidResourceService, buildCreateBescheidDocumentFromFileProps, buildUpdateBescheidCommandProps, createBescheidListResourceService, createBescheidResourceService, } from '@alfa-client/bescheid-shared';
+import {
+  BescheidListResourceService,
+  BescheidResourceService,
+  buildCreateBescheidDocumentFromFileProps,
+  buildUpdateBescheidCommandProps,
+  createBescheidListResourceService,
+  createBescheidResourceService,
+} from '@alfa-client/bescheid-shared';
 import { expect } from '@jest/globals';
 import { cold } from 'jest-marbles';
 import * as DateUtil from '../../../tech-shared/src/lib/date.util';
@@ -147,7 +192,7 @@ describe('BescheidService', () => {
     it('should reload postfach list', () => {
       service.exit();
 
-      expect(postfachService.setPostfachMailOnReload).toHaveBeenCalled();
+      expect(postfachService._setPostfachMailOnReload).toHaveBeenCalled();
     });
 
     it('should clear uploaded files', () => {
diff --git a/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts b/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts
index f87f719381..22107e92d9 100644
--- a/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts
+++ b/alfa-client/libs/bescheid-shared/src/lib/bescheid.service.ts
@@ -89,7 +89,7 @@ export class BescheidService {
   private readonly resourceRepository = inject(ResourceRepository);
   private readonly postfachService = inject(PostfachService);
   private readonly vorgangService = inject(VorgangService);
-  // The injection of this service and the one below is problematic.
+  // The injection of this services is problematic.
   // It must be analysed how to inject BescheidService via providers in BescheidSharedModule.
   private readonly bescheidResourceService = createBescheidResourceService(
     this.resourceRepository,
@@ -97,7 +97,7 @@ export class BescheidService {
     this.vorgangService,
   );
   private readonly bescheidListResourceService = createBescheidListResourceService(this.resourceRepository, this.vorgangService);
-
+  //
   readonly _bescheidDocument$: BehaviorSubject<BescheidDocument> = new BehaviorSubject(createEmptyBescheidDocument());
   readonly _wizard$: BehaviorSubject<Wizard> = new BehaviorSubject(createInitialWizard());
 
diff --git a/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.spec.ts b/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.spec.ts
index 9753cc7fa2..4470d7d9b7 100644
--- a/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.spec.ts
+++ b/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-form/kommentar-form.component.spec.ts
@@ -102,7 +102,7 @@ describe('KommentarFormComponent', () => {
     const patchSpy = jest.spyOn(KommentarFormService.prototype, 'patch').mockImplementation();
     const kommentarResource = createKommentarResource([KommentarLinkRel.ATTACHMENTS]);
     component.kommentar = kommentarResource;
-    kommentarService.getAttachments.mockReturnValue(of(createStateResource(createBinaryFileListResource())));
+    kommentarService._getAttachments.mockReturnValue(of(createStateResource(createBinaryFileListResource())));
 
     component.ngOnChanges();
 
@@ -111,7 +111,7 @@ describe('KommentarFormComponent', () => {
 
   it('should load attachments', (done) => {
     component.kommentar = createKommentarResource([KommentarLinkRel.ATTACHMENTS]);
-    kommentarService.getAttachments.mockReturnValue(of(createStateResource(createBinaryFileListResource())));
+    kommentarService._getAttachments.mockReturnValue(of(createStateResource(createBinaryFileListResource())));
 
     component.ngOnChanges();
 
@@ -124,11 +124,11 @@ describe('KommentarFormComponent', () => {
   it('should call kommentarService', () => {
     const kommentarResource = createKommentarResource([KommentarLinkRel.ATTACHMENTS]);
     component.kommentar = kommentarResource;
-    kommentarService.getAttachments.mockReturnValue(of(createStateResource(createBinaryFileListResource())));
+    kommentarService._getAttachments.mockReturnValue(of(createStateResource(createBinaryFileListResource())));
 
     component.ngOnChanges();
 
-    expect(kommentarService.getAttachments).toHaveBeenCalledWith(kommentarResource);
+    expect(kommentarService._getAttachments).toHaveBeenCalledWith(kommentarResource);
   });
 
   describe('submit', () => {
diff --git a/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-list-in-vorgang-container.component.spec.ts b/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-list-in-vorgang-container.component.spec.ts
index 1fa1116867..e27318f11b 100644
--- a/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-list-in-vorgang-container.component.spec.ts
+++ b/alfa-client/libs/kommentar/src/lib/kommentar-list-in-vorgang-container/kommentar-list-in-vorgang-container.component.spec.ts
@@ -127,7 +127,7 @@ describe('KommentarListInVorgangContainerComponent', () => {
 
   describe('reloadKommentarListOnVorgangReload', () => {
     beforeEach(() => {
-      kommentarService.setKommentarListReload.mockClear();
+      kommentarService._setKommentarListReload.mockClear();
     });
 
     it('should call kommentarService', () => {
@@ -138,7 +138,7 @@ describe('KommentarListInVorgangContainerComponent', () => {
 
       component.reloadKommentarListOnVorgangReload();
 
-      expect(kommentarService.setKommentarListReload).toHaveBeenCalled();
+      expect(kommentarService._setKommentarListReload).toHaveBeenCalled();
     });
 
     it('should not call kommentarService', () => {
@@ -149,7 +149,7 @@ describe('KommentarListInVorgangContainerComponent', () => {
 
       component.reloadKommentarListOnVorgangReload();
 
-      expect(kommentarService.setKommentarListReload).not.toHaveBeenCalled();
+      expect(kommentarService._setKommentarListReload).not.toHaveBeenCalled();
     });
   });
 
diff --git a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list-container.component.spec.ts b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list-container.component.spec.ts
index f2b47f34a7..62804bcc27 100644
--- a/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list-container.component.spec.ts
+++ b/alfa-client/libs/postfach/src/lib/postfach-mail-list-container/postfach-mail-list-container.component.spec.ts
@@ -82,7 +82,7 @@ describe('PostfachMailListContainerComponent', () => {
 
   describe('reloadPostfachMailListOnVorgangReload', () => {
     beforeEach(() => {
-      postfachService.setPostfachMailOnReload.mockClear();
+      postfachService._setPostfachMailOnReload.mockClear();
     });
 
     it('should call postfachService', () => {
@@ -93,7 +93,7 @@ describe('PostfachMailListContainerComponent', () => {
 
       component.reloadPostfachMailListOnVorgangReload();
 
-      expect(postfachService.setPostfachMailOnReload).toHaveBeenCalled();
+      expect(postfachService._setPostfachMailOnReload).toHaveBeenCalled();
     });
 
     it('should not call postfachService', () => {
@@ -104,7 +104,7 @@ describe('PostfachMailListContainerComponent', () => {
 
       component.reloadPostfachMailListOnVorgangReload();
 
-      expect(postfachService.setPostfachMailOnReload).not.toHaveBeenCalled();
+      expect(postfachService._setPostfachMailOnReload).not.toHaveBeenCalled();
     });
   });
 });
diff --git a/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-container/wiedervorlage-list-in-vorgang-container.component.spec.ts b/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-container/wiedervorlage-list-in-vorgang-container.component.spec.ts
index 305ae85a35..533f48ef56 100644
--- a/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-container/wiedervorlage-list-in-vorgang-container.component.spec.ts
+++ b/alfa-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-container/wiedervorlage-list-in-vorgang-container.component.spec.ts
@@ -86,7 +86,7 @@ describe('WiedervorlageListInVorgangContainerComponent', () => {
 
   describe('reloadWiedervorlageListOnVorgangReload', () => {
     beforeEach(() => {
-      wiedervorlageService.setWiedervorlageListReload.mockClear();
+      wiedervorlageService._setWiedervorlageListReload.mockClear();
     });
 
     it('should call wiedervorlageService', () => {
@@ -97,7 +97,7 @@ describe('WiedervorlageListInVorgangContainerComponent', () => {
 
       component.reloadWiedervorlageListOnVorgangReload();
 
-      expect(wiedervorlageService.setWiedervorlageListReload).toHaveBeenCalled();
+      expect(wiedervorlageService._setWiedervorlageListReload).toHaveBeenCalled();
     });
 
     it('should not call wiedervorlageService', () => {
@@ -108,7 +108,7 @@ describe('WiedervorlageListInVorgangContainerComponent', () => {
 
       component.reloadWiedervorlageListOnVorgangReload();
 
-      expect(wiedervorlageService.setWiedervorlageListReload).not.toHaveBeenCalled();
+      expect(wiedervorlageService._setWiedervorlageListReload).not.toHaveBeenCalled();
     });
   });
 });
-- 
GitLab