From 898aa858b129427133a6cf3363f37f866d28f840 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Mon, 8 Apr 2024 10:17:02 +0200 Subject: [PATCH] toShortString without title+salutation --- .../hsadminng/hs/office/person/HsOfficePersonEntity.java | 2 +- .../hs/office/person/HsOfficePersonEntityUnitTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java index 5f847842..673d1fc5 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntity.java @@ -70,7 +70,7 @@ public class HsOfficePersonEntity implements RbacObject, Stringifyable { @Override public String toShortString() { return personType + " " + - (!StringUtils.isEmpty(tradeName) ? tradeName : (StringUtils.isEmpty(salutation) ? "" : salutation + " ") + (familyName + ", " + givenName)); + (!StringUtils.isEmpty(tradeName) ? tradeName : (familyName + ", " + givenName)); } public static RbacView rbac() { diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityUnitTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityUnitTest.java index 9d85fb22..19aa3988 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityUnitTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonEntityUnitTest.java @@ -72,7 +72,7 @@ class HsOfficePersonEntityUnitTest { final var actualDisplay = givenPersonEntity.toShortString(); - assertThat(actualDisplay).isEqualTo("NP Frau Dr. some family name, some given name"); + assertThat(actualDisplay).isEqualTo("NP some family name, some given name"); } @Test @@ -100,7 +100,7 @@ class HsOfficePersonEntityUnitTest { final var actualDisplay = givenPersonEntity.toShortString(); - assertThat(actualDisplay).isEqualTo("NP Dr. Dr. some family name, some given name"); + assertThat(actualDisplay).isEqualTo("NP some family name, some given name"); } @Test