From 52f6fb653863089a53ca53fc4ca02d80e0b23403 Mon Sep 17 00:00:00 2001
From: Albert <Albert.Bruns@mgm-tp.com>
Date: Tue, 29 Apr 2025 10:52:49 +0200
Subject: [PATCH] OZG-7773 CR Anmerkungen

---
 .../postfach-shared/src/lib/postfach.repository.spec.ts     | 6 +++---
 .../libs/postfach-shared/src/lib/postfach.repository.ts     | 2 +-
 .../libs/postfach-shared/src/lib/postfach.service.spec.ts   | 6 +++---
 .../libs/postfach-shared/src/lib/postfach.service.ts        | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts
index c67a73ad70..377719bb01 100644
--- a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts
+++ b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts
@@ -90,19 +90,19 @@ describe('PostfachRepository', () => {
     });
   });
 
-  describe('setHasNewPostfachNachrichten', () => {
+  describe('markPostfachAsUnread', () => {
     const postfachMailListResource: PostfachMailListResource = createPostfachMailListResource([
       PostfachMailListLinkRel.SET_HAS_NEW_POSTFACH_NACHRICHT,
     ]);
 
     it('should call resourceFactory with resource', () => {
-      repository.setHasNewPostfachNachrichten(postfachMailListResource);
+      repository.markPostfachAsUnread(postfachMailListResource);
 
       expect(resourceFactory.from).toHaveBeenCalledWith(postfachMailListResource);
     });
 
     it('should call resourceWrapper with link', () => {
-      repository.setHasNewPostfachNachrichten(postfachMailListResource);
+      repository.markPostfachAsUnread(postfachMailListResource);
 
       expect(resourceWrapper.put).toHaveBeenCalledWith(PostfachMailListLinkRel.SET_HAS_NEW_POSTFACH_NACHRICHT, {
         hasNewPostfachNachricht: true,
diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts
index 76696a94d7..8a8b03f3d3 100644
--- a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts
+++ b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts
@@ -42,7 +42,7 @@ export class PostfachRepository {
     });
   }
 
-  public setHasNewPostfachNachrichten(postfachNachrichtenList: PostfachMailListResource): Observable<unknown> {
+  public markPostfachAsUnread(postfachNachrichtenList: PostfachMailListResource): Observable<unknown> {
     return this.resourceFactory.from(postfachNachrichtenList).put(PostfachMailListLinkRel.SET_HAS_NEW_POSTFACH_NACHRICHT, {
       hasNewPostfachNachricht: true,
     });
diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts
index 08fe1caa94..f56688a6e9 100644
--- a/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts
+++ b/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts
@@ -463,13 +463,13 @@ describe('PostfachService', () => {
   describe('setPostfachNachrichtListAsUnread', () => {
     beforeEach(() => {
       service._navigateToCurrentVorgang = jest.fn();
-      repository.setHasNewPostfachNachrichten = jest.fn().mockReturnValue(of(null));
+      repository.markPostfachAsUnread = jest.fn().mockReturnValue(of(null));
     });
 
-    it('should set hasNewPostfachNachrichten', () => {
+    it('should mark postfach as unread', () => {
       service.setPostfachNachrichtListAsUnread();
 
-      expect(repository.setHasNewPostfachNachrichten).toHaveBeenCalled();
+      expect(repository.markPostfachAsUnread).toHaveBeenCalled();
     });
 
     it('should navigate to vorgang', () => {
diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts
index 64c238ddfa..3abb5760cc 100644
--- a/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts
+++ b/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts
@@ -291,7 +291,7 @@ export class PostfachService {
 
   public setPostfachNachrichtListAsUnread() {
     this.repository
-      .setHasNewPostfachNachrichten(this.postfachMailList$.value.resource)
+      .markPostfachAsUnread(this.postfachMailList$.value.resource)
       .pipe(take(1))
       .subscribe(() => {
         this._navigateToCurrentVorgang();
-- 
GitLab