1

Formatting

Co-authored-by: Christoph <tobi@urpost.de>
This commit is contained in:
Christoph
2020-03-18 20:18:03 +01:00
parent 01c0cac2a2
commit 2ba913f2c8
40 changed files with 354 additions and 245 deletions

View File

@ -16,6 +16,7 @@ import mops.gruppen2.domain.User;
@AllArgsConstructor
@NoArgsConstructor
public class AddUserEvent extends Event {
String givenname;
String familyname;
String email;
@ -27,10 +28,10 @@ public class AddUserEvent extends Event {
this.email = email;
}
public void apply(Group group) throws EventException{
public void apply(Group group) throws EventException {
User user = new User(this.user_id, this.givenname, this.familyname, this.email);
if (group.getMembers().contains(user)){
if (group.getMembers().contains(user)) {
throw new UserAlreadyExistsException("Der User existiert bereits");
}