Skip to content
Snippets Groups Projects
Commit 1b23fb7f authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-3539-remove-code-deps-from-migration-code' (#130) from...

Merge pull request 'OZG-3539-remove-code-deps-from-migration-code' (#130) from OZG-3539-remove-code-deps-from-migration-code into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/user-manager/pulls/130


Reviewed-by: default avatarOZGCloud <ozgcloud@mgm-tp.com>
parents f9cc382b 7891bb86
Branches
Tags
No related merge requests found
Showing with 165 additions and 67 deletions
package de.ozgcloud.user.common.migration; package de.ozgcloud.user.common.migration;
import static de.ozgcloud.user.common.DocumentUtils.*;
import java.util.Map; import java.util.Map;
import org.bson.Document; import org.bson.Document;
...@@ -9,8 +7,6 @@ import org.bson.Document; ...@@ -9,8 +7,6 @@ import org.bson.Document;
import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase; import com.mongodb.client.MongoDatabase;
import de.ozgcloud.user.User;
import de.ozgcloud.user.settings.UserSettings;
import io.mongock.api.annotations.ChangeUnit; import io.mongock.api.annotations.ChangeUnit;
import io.mongock.api.annotations.Execution; import io.mongock.api.annotations.Execution;
import io.mongock.api.annotations.RollbackExecution; import io.mongock.api.annotations.RollbackExecution;
...@@ -20,11 +16,19 @@ import lombok.RequiredArgsConstructor; ...@@ -20,11 +16,19 @@ import lombok.RequiredArgsConstructor;
@ChangeUnit(id = "2024-09-22 12:00:00 OZG-3539", order = "M001", author = "sbergandy", systemVersion = "1") @ChangeUnit(id = "2024-09-22 12:00:00 OZG-3539", order = "M001", author = "sbergandy", systemVersion = "1")
public class M001_SetNewAndMigrateUserSettings { public class M001_SetNewAndMigrateUserSettings {
static final String USER_COLLECTION_NAME = "User";
static final String USER_SETTINGS_FIELD = "userSettings";
static final String NOTIFICATIONS_SEND_FOR_FIELD = "notificationsSendFor";
static final String VORGANG_CREATED_FIELD = "vorgangCreated";
static final String VORGANG_ASSIGNED_TO_USER_FIELD = "vorgangAssignedToUser";
static final String POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD = "postfachNachrichtFromAntragsteller";
static final String WIEDERVORLAGE_DUE_TODAY = "wiedervorlageDueToday";
private final MongoDatabase mongoDatabase; private final MongoDatabase mongoDatabase;
@Execution @Execution
public void migrationMethod() { public void migrationMethod() {
var userCollection = mongoDatabase.getCollection(User.COLLECTION_NAME); var userCollection = mongoDatabase.getCollection(USER_COLLECTION_NAME);
migrateNotificationsSendForALL(userCollection); migrateNotificationsSendForALL(userCollection);
migrateNotificationsSendForNONE(userCollection); migrateNotificationsSendForNONE(userCollection);
migrateEmptySettings(userCollection); migrateEmptySettings(userCollection);
...@@ -32,39 +36,43 @@ public class M001_SetNewAndMigrateUserSettings { ...@@ -32,39 +36,43 @@ public class M001_SetNewAndMigrateUserSettings {
private void migrateNotificationsSendForALL(MongoCollection<Document> userCollection) { private void migrateNotificationsSendForALL(MongoCollection<Document> userCollection) {
userCollection.updateMany( userCollection.updateMany(
new Document(Map.of(buildFieldPath(User.USER_SETTINGS_FIELD, UserSettings.NOTIFICATIONS_SEND_FOR_FIELD), "ALL")), new Document(Map.of(buildFieldPath(USER_SETTINGS_FIELD, NOTIFICATIONS_SEND_FOR_FIELD), "ALL")),
new Document(Map.of("$set", Map.of(User.USER_SETTINGS_FIELD, new Document(Map.of("$set", Map.of(USER_SETTINGS_FIELD,
Map.of(UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "ALL", Map.of(NOTIFICATIONS_SEND_FOR_FIELD, "ALL",
UserSettings.VORGANG_CREATED_FIELD, true, VORGANG_CREATED_FIELD, true,
UserSettings.VORGANG_ASSIGNED_TO_USER_FIELD, true, VORGANG_ASSIGNED_TO_USER_FIELD, true,
UserSettings.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true, POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true,
UserSettings.WIEDERVORLAGE_OVERDUE_FIELD, true))))); WIEDERVORLAGE_DUE_TODAY, true)))));
} }
private void migrateNotificationsSendForNONE(MongoCollection<Document> userCollection) { private void migrateNotificationsSendForNONE(MongoCollection<Document> userCollection) {
userCollection.updateMany( userCollection.updateMany(
new Document(Map.of(buildFieldPath(User.USER_SETTINGS_FIELD, UserSettings.NOTIFICATIONS_SEND_FOR_FIELD), "NONE")), new Document(Map.of(buildFieldPath(USER_SETTINGS_FIELD, NOTIFICATIONS_SEND_FOR_FIELD), "NONE")),
new Document(Map.of("$set", Map.of(User.USER_SETTINGS_FIELD, new Document(Map.of("$set", Map.of(USER_SETTINGS_FIELD,
Map.of(UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "NONE", Map.of(NOTIFICATIONS_SEND_FOR_FIELD, "NONE",
UserSettings.VORGANG_CREATED_FIELD, false, VORGANG_CREATED_FIELD, false,
UserSettings.VORGANG_ASSIGNED_TO_USER_FIELD, true, VORGANG_ASSIGNED_TO_USER_FIELD, true,
UserSettings.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true, POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true,
UserSettings.WIEDERVORLAGE_OVERDUE_FIELD, true))))); WIEDERVORLAGE_DUE_TODAY, true)))));
} }
private void migrateEmptySettings(MongoCollection<Document> userCollection) { private void migrateEmptySettings(MongoCollection<Document> userCollection) {
userCollection.updateMany( userCollection.updateMany(
new Document(Map.of(buildFieldPath(User.USER_SETTINGS_FIELD, UserSettings.NOTIFICATIONS_SEND_FOR_FIELD), Map.of("$exists", false))), new Document(Map.of(buildFieldPath(USER_SETTINGS_FIELD, NOTIFICATIONS_SEND_FOR_FIELD), Map.of("$exists", false))),
new Document(Map.of("$set", Map.of(User.USER_SETTINGS_FIELD, new Document(Map.of("$set", Map.of(USER_SETTINGS_FIELD,
Map.of(UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "NONE", Map.of(NOTIFICATIONS_SEND_FOR_FIELD, "NONE",
UserSettings.VORGANG_CREATED_FIELD, false, VORGANG_CREATED_FIELD, false,
UserSettings.VORGANG_ASSIGNED_TO_USER_FIELD, true, VORGANG_ASSIGNED_TO_USER_FIELD, true,
UserSettings.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true, POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true,
UserSettings.WIEDERVORLAGE_OVERDUE_FIELD, true))))); WIEDERVORLAGE_DUE_TODAY, true)))));
} }
@RollbackExecution @RollbackExecution
public void rollback() { public void rollback() {
// kein rollback implementiert // kein rollback implementiert
} }
private String buildFieldPath(String... fields) {
return String.join(".", fields);
}
} }
...@@ -35,16 +35,12 @@ import lombok.Setter; ...@@ -35,16 +35,12 @@ import lombok.Setter;
public class UserSettings { public class UserSettings {
public static final String NOTIFICATIONS_SEND_FOR_FIELD = "notificationsSendFor"; public static final String NOTIFICATIONS_SEND_FOR_FIELD = "notificationsSendFor";
public static final String VORGANG_CREATED_FIELD = "vorgangCreated";
public static final String VORGANG_ASSIGNED_TO_USER_FIELD = "vorgangAssignedToUser";
public static final String POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD = "postfachNachrichtFromAntragsteller";
public static final String WIEDERVORLAGE_OVERDUE_FIELD = "wiedervorlageOverdue";
private NotificationsSendFor notificationsSendFor; private NotificationsSendFor notificationsSendFor;
private boolean vorgangCreated; private boolean vorgangCreated;
private boolean vorgangAssignedToUser; private boolean vorgangAssignedToUser;
private boolean postfachNachrichtFromAntragsteller; private boolean postfachNachrichtFromAntragsteller;
private boolean wiedervorlageOverdue; private boolean wiedervorlageDueToday;
public UserSettings(NotificationsSendFor notificationsSendFor) { public UserSettings(NotificationsSendFor notificationsSendFor) {
this(notificationsSendFor, notificationsSendFor == NotificationsSendFor.ALL, true, true, true); this(notificationsSendFor, notificationsSendFor == NotificationsSendFor.ALL, true, true, true);
......
...@@ -28,6 +28,7 @@ import java.util.Objects; ...@@ -28,6 +28,7 @@ import java.util.Objects;
import jakarta.inject.Inject; import jakarta.inject.Inject;
import jakarta.ws.rs.GET; import jakarta.ws.rs.GET;
import jakarta.ws.rs.PATCH; import jakarta.ws.rs.PATCH;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path; import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam; import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces; import jakarta.ws.rs.Produces;
...@@ -75,6 +76,7 @@ public class UserSettingsResource { ...@@ -75,6 +76,7 @@ public class UserSettingsResource {
return resourceAssembler.toResource(userSettingsService.getByUserId(userId), userId, userManagerUrl); return resourceAssembler.toResource(userSettingsService.getByUserId(userId), userId, userManagerUrl);
} }
@Deprecated
@PATCH @PATCH
@ResponseStatus(200) @ResponseStatus(200)
@Path("/{id}/settings") @Path("/{id}/settings")
...@@ -91,6 +93,22 @@ public class UserSettingsResource { ...@@ -91,6 +93,22 @@ public class UserSettingsResource {
.orElseThrow(() -> new FunctionalException(() -> "Invalid user id")); .orElseThrow(() -> new FunctionalException(() -> "Invalid user id"));
} }
@PUT
@ResponseStatus(200)
@Path("/{id}/settings")
@Produces({ MediaType.APPLICATION_JSON, RestMediaType.APPLICATION_HAL_JSON })
public HalEntityWrapper putUserSettings(@PathParam("id") String userId, UserSettings userSettings) {
checkUserAccess(userId);
if (Objects.isNull(userSettings)) {
throw new FunctionalException(() -> "Request Body missing.");
}
return userSettingsService.updateByUserId(userId, userSettings)
.map(updatedSettings -> resourceAssembler.toResource(updatedSettings, userId, userManagerUrl))
.orElseThrow(() -> new FunctionalException(() -> "Invalid user id"));
}
void checkUserAccess(String userId) { void checkUserAccess(String userId) {
var user = userService.findByExternalId(jwt.getSubject()); var user = userService.findByExternalId(jwt.getSubject());
......
package de.ozgcloud.user.common.migration; package de.ozgcloud.user.common.migration;
import static de.ozgcloud.user.common.migration.M001_SetNewAndMigrateUserSettings.*;
import static org.assertj.core.api.Assertions.*; import static org.assertj.core.api.Assertions.*;
import java.util.Map; import java.util.Map;
...@@ -14,9 +15,7 @@ import org.junit.jupiter.api.Test; ...@@ -14,9 +15,7 @@ import org.junit.jupiter.api.Test;
import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoCollection;
import de.ozgcloud.user.User;
import de.ozgcloud.user.common.MongoDbTestProfile; import de.ozgcloud.user.common.MongoDbTestProfile;
import de.ozgcloud.user.settings.UserSettings;
import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile; import io.quarkus.test.junit.TestProfile;
...@@ -24,6 +23,8 @@ import io.quarkus.test.junit.TestProfile; ...@@ -24,6 +23,8 @@ import io.quarkus.test.junit.TestProfile;
@TestProfile(MongoDbTestProfile.class) @TestProfile(MongoDbTestProfile.class)
class M001_SetNewAndMigrateUserSettingsITCase { class M001_SetNewAndMigrateUserSettingsITCase {
static final String USERNAME_FIELD = "username";
@ConfigProperty(name = "quarkus.mongodb.database") @ConfigProperty(name = "quarkus.mongodb.database")
String database; String database;
...@@ -40,55 +41,55 @@ class M001_SetNewAndMigrateUserSettingsITCase { ...@@ -40,55 +41,55 @@ class M001_SetNewAndMigrateUserSettingsITCase {
@BeforeEach @BeforeEach
void initDatabase() { void initDatabase() {
userCollection = mongoClient.getDatabase(database).getCollection(User.COLLECTION_NAME); userCollection = mongoClient.getDatabase(database).getCollection(USER_COLLECTION_NAME);
userCollection.drop(); userCollection.drop();
userCollection.insertOne(new Document( userCollection.insertOne(new Document(
Map.of(User.USERNAME_FIELD, "alluser", Map.of(USERNAME_FIELD, "alluser",
User.USER_SETTINGS_FIELD, Map.of(UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "ALL")))); USER_SETTINGS_FIELD, Map.of(NOTIFICATIONS_SEND_FOR_FIELD, "ALL"))));
userCollection.insertOne(new Document(Map.of(User.USERNAME_FIELD, "noneuser", userCollection.insertOne(new Document(Map.of(USERNAME_FIELD, "noneuser",
User.USER_SETTINGS_FIELD, Map.of(UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "NONE")))); USER_SETTINGS_FIELD, Map.of(NOTIFICATIONS_SEND_FOR_FIELD, "NONE"))));
userCollection.insertOne(new Document(Map.of(User.USERNAME_FIELD, "nosettings"))); userCollection.insertOne(new Document(Map.of(USERNAME_FIELD, "nosettings")));
} }
@Test @Test
void shouldMigrateNotificationSendFor_ALL() { void shouldMigrateNotificationSendFor_ALL() {
migration.migrationMethod(); migration.migrationMethod();
var user = userCollection.find(new Document(Map.of(User.USERNAME_FIELD, "alluser"))); var user = userCollection.find(new Document(Map.of(USERNAME_FIELD, "alluser")));
assertThat(user.first()).contains( assertThat(user.first()).contains(
entry(User.USER_SETTINGS_FIELD, new Document(Map.of( entry(USER_SETTINGS_FIELD, new Document(Map.of(
UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "ALL", NOTIFICATIONS_SEND_FOR_FIELD, "ALL",
UserSettings.VORGANG_CREATED_FIELD, true, VORGANG_CREATED_FIELD, true,
UserSettings.VORGANG_ASSIGNED_TO_USER_FIELD, true, VORGANG_ASSIGNED_TO_USER_FIELD, true,
UserSettings.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true, POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true,
UserSettings.WIEDERVORLAGE_OVERDUE_FIELD, true)))); WIEDERVORLAGE_DUE_TODAY, true))));
} }
@Test @Test
void shouldMigrateNotificationSendFor_NONE() { void shouldMigrateNotificationSendFor_NONE() {
migration.migrationMethod(); migration.migrationMethod();
var user = userCollection.find(new Document(Map.of(User.USERNAME_FIELD, "noneuser"))); var user = userCollection.find(new Document(Map.of(USERNAME_FIELD, "noneuser")));
assertThat(user.first()).contains( assertThat(user.first()).contains(
entry(User.USER_SETTINGS_FIELD, new Document(Map.of( entry(USER_SETTINGS_FIELD, new Document(Map.of(
UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "NONE", NOTIFICATIONS_SEND_FOR_FIELD, "NONE",
UserSettings.VORGANG_CREATED_FIELD, false, VORGANG_CREATED_FIELD, false,
UserSettings.VORGANG_ASSIGNED_TO_USER_FIELD, true, VORGANG_ASSIGNED_TO_USER_FIELD, true,
UserSettings.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true, POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true,
UserSettings.WIEDERVORLAGE_OVERDUE_FIELD, true)))); WIEDERVORLAGE_DUE_TODAY, true))));
} }
@Test @Test
void shouldSetDefaultSettings() { void shouldSetDefaultSettings() {
migration.migrationMethod(); migration.migrationMethod();
var user = userCollection.find(new Document(Map.of(User.USERNAME_FIELD, "nosettings"))); var user = userCollection.find(new Document(Map.of(USERNAME_FIELD, "nosettings")));
assertThat(user.first()).contains( assertThat(user.first()).contains(
entry(User.USER_SETTINGS_FIELD, new Document(Map.of( entry(USER_SETTINGS_FIELD, new Document(Map.of(
UserSettings.NOTIFICATIONS_SEND_FOR_FIELD, "NONE", NOTIFICATIONS_SEND_FOR_FIELD, "NONE",
UserSettings.VORGANG_CREATED_FIELD, false, VORGANG_CREATED_FIELD, false,
UserSettings.VORGANG_ASSIGNED_TO_USER_FIELD, true, VORGANG_ASSIGNED_TO_USER_FIELD, true,
UserSettings.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true, POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER_FIELD, true,
UserSettings.WIEDERVORLAGE_OVERDUE_FIELD, true)))); WIEDERVORLAGE_DUE_TODAY, true))));
} }
} }
\ No newline at end of file
...@@ -198,6 +198,81 @@ class UserSettingsResourceTest { ...@@ -198,6 +198,81 @@ class UserSettingsResourceTest {
} }
} }
@DisplayName("Update Usersettings")
@Nested
class TestPutUserSettings {
private final UserSettings userSettings = UserSettingsTestFactory.create();
private final UserSettings updatedUserSettings = UserSettingsTestFactory.create();
@BeforeEach
void mockAccess() {
doNothing().when(resource).checkUserAccess(anyString());
}
@Test
void shouldCheckAccess() {
when(userSettingsService.updateByUserId(USER_ID, userSettings)).thenReturn(Optional.of(updatedUserSettings));
when(resourceAssembler.toResource(any(), anyString(), anyString())).thenReturn(new HalEntityWrapper(null));
resource.putUserSettings(USER_ID, userSettings);
verify(resource).checkUserAccess(USER_ID);
}
@DisplayName("with empty body")
@Nested
class TestOnEmptyBody {
@Test
void shouldThrowFunctionalExceptionOnMissingBody() {
assertThatExceptionOfType(FunctionalException.class).isThrownBy(() -> resource.putUserSettings(USER_ID, null))
.withMessageStartingWith("Functional error: Request Body missing");
}
}
@Nested
class TestUserIdNotExist {
@Test
void shouldThrowFunctionalException() {
when(userSettingsService.updateByUserId(USER_ID, userSettings)).thenReturn(Optional.empty());
assertThatExceptionOfType(FunctionalException.class)
.isThrownBy(() -> resource.putUserSettings(USER_ID, userSettings))
.withMessageStartingWith("Functional error: Invalid user id");
}
}
@Nested
class TestFilledBody {
@BeforeEach
void setUp() {
when(userSettingsService.updateByUserId(USER_ID, userSettings)).thenReturn(Optional.of(updatedUserSettings));
}
@Test
void shouldCallUserSettingsService() {
when(resourceAssembler.toResource(updatedUserSettings, USER_ID, USER_MANAGER_URL)).thenReturn(new HalEntityWrapper(null));
resource.putUserSettings(USER_ID, userSettings);
verify(userSettingsService).updateByUserId(USER_ID, userSettings);
}
@Test
void
shouldCallResourceAssembler() {
when(resourceAssembler.toResource(updatedUserSettings, USER_ID, USER_MANAGER_URL)).thenReturn(new HalEntityWrapper(null));
resource.putUserSettings(USER_ID, userSettings);
verify(resourceAssembler).toResource(updatedUserSettings, USER_ID, USER_MANAGER_URL);
}
}
}
@DisplayName("Check User access") @DisplayName("Check User access")
@Nested @Nested
class TestCheckUserAccess { class TestCheckUserAccess {
......
...@@ -79,13 +79,13 @@ class UserSettingsServiceTest { ...@@ -79,13 +79,13 @@ class UserSettingsServiceTest {
UserSettings::isVorgangCreated, UserSettings::isVorgangCreated,
UserSettings::isVorgangAssignedToUser, UserSettings::isVorgangAssignedToUser,
UserSettings::isPostfachNachrichtFromAntragsteller, UserSettings::isPostfachNachrichtFromAntragsteller,
UserSettings::isWiedervorlageOverdue) UserSettings::isWiedervorlageDueToday)
.containsExactly( .containsExactly(
NotificationsSendFor.ALL, NotificationsSendFor.ALL,
true, true,
UserSettingsTestFactory.VORGANG_ASSIGNED_TO_USER, UserSettingsTestFactory.VORGANG_ASSIGNED_TO_USER,
UserSettingsTestFactory.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER, UserSettingsTestFactory.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER,
UserSettingsTestFactory.WIEDERVORLAGE_OVERDUE); UserSettingsTestFactory.WIEDERVORLAGE_DUE_TODAY);
} }
@Test @Test
...@@ -99,13 +99,13 @@ class UserSettingsServiceTest { ...@@ -99,13 +99,13 @@ class UserSettingsServiceTest {
UserSettings::isVorgangCreated, UserSettings::isVorgangCreated,
UserSettings::isVorgangAssignedToUser, UserSettings::isVorgangAssignedToUser,
UserSettings::isPostfachNachrichtFromAntragsteller, UserSettings::isPostfachNachrichtFromAntragsteller,
UserSettings::isWiedervorlageOverdue) UserSettings::isWiedervorlageDueToday)
.containsExactly( .containsExactly(
NotificationsSendFor.NONE, NotificationsSendFor.NONE,
false, false,
UserSettingsTestFactory.VORGANG_ASSIGNED_TO_USER, UserSettingsTestFactory.VORGANG_ASSIGNED_TO_USER,
UserSettingsTestFactory.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER, UserSettingsTestFactory.POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER,
UserSettingsTestFactory.WIEDERVORLAGE_OVERDUE); UserSettingsTestFactory.WIEDERVORLAGE_DUE_TODAY);
} }
} }
......
...@@ -38,7 +38,7 @@ class UserSettingsTest { ...@@ -38,7 +38,7 @@ class UserSettingsTest {
void shouldHaveDefaultSettings() { void shouldHaveDefaultSettings() {
assertThat(UserSettings.createDefault()).usingRecursiveComparison().isEqualTo( assertThat(UserSettings.createDefault()).usingRecursiveComparison().isEqualTo(
UserSettings.builder().notificationsSendFor(NotificationsSendFor.NONE).vorgangCreated(false).vorgangAssignedToUser(true) UserSettings.builder().notificationsSendFor(NotificationsSendFor.NONE).vorgangCreated(false).vorgangAssignedToUser(true)
.postfachNachrichtFromAntragsteller(true).wiedervorlageOverdue(true).build()); .postfachNachrichtFromAntragsteller(true).wiedervorlageDueToday(true).build());
} }
} }
......
...@@ -29,7 +29,7 @@ public class UserSettingsTestFactory { ...@@ -29,7 +29,7 @@ public class UserSettingsTestFactory {
public static final boolean VORGANG_CREATED = false; public static final boolean VORGANG_CREATED = false;
public static final boolean VORGANG_ASSIGNED_TO_USER = true; public static final boolean VORGANG_ASSIGNED_TO_USER = true;
public static final boolean POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER = true; public static final boolean POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER = true;
public static final boolean WIEDERVORLAGE_OVERDUE = true; public static final boolean WIEDERVORLAGE_DUE_TODAY = true;
public static UserSettings create() { public static UserSettings create() {
return createBuilder().build(); return createBuilder().build();
...@@ -41,6 +41,6 @@ public class UserSettingsTestFactory { ...@@ -41,6 +41,6 @@ public class UserSettingsTestFactory {
.vorgangCreated(VORGANG_CREATED) .vorgangCreated(VORGANG_CREATED)
.vorgangAssignedToUser(VORGANG_ASSIGNED_TO_USER) .vorgangAssignedToUser(VORGANG_ASSIGNED_TO_USER)
.postfachNachrichtFromAntragsteller(POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER) .postfachNachrichtFromAntragsteller(POSTFACH_NACHRICHT_FROM_ANTRAGSTELLER)
.wiedervorlageOverdue(WIEDERVORLAGE_OVERDUE); .wiedervorlageDueToday(WIEDERVORLAGE_DUE_TODAY);
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment