refactoring and integration tests

This commit is contained in:
2022-10-10 04:02:46 +03:00
parent 28a6981001
commit ec54d2c255
15 changed files with 172 additions and 7 deletions
@@ -41,6 +41,9 @@ namespace PracticeCalendar.Domain.Entities
{
this.Title = title;
this.Description = description;
var titleDescUpdatedEvent = new EventUpdateTitleAndDescriptionEvent(this);
base.RegisterDomainEvent(titleDescUpdatedEvent);
}
public void AttendeeAcceptEvent(int attendeeId)
@@ -49,6 +52,9 @@ namespace PracticeCalendar.Domain.Entities
if (attendee == null)
throw new InvalidAttendeeException(attendeeId);
attendee.SetIsAttending(true);
var attendeeAcceptedEvent = new AttendeeAcceptedEvent(this, attendee);
base.RegisterDomainEvent(attendeeAcceptedEvent);
}
public void AttendeeDeclineEvent(int attendeeId)
@@ -57,6 +63,9 @@ namespace PracticeCalendar.Domain.Entities
if (attendee == null)
throw new InvalidAttendeeException(attendeeId);
attendee.SetIsAttending(false);
var attendeeDeclinedEvent = new AttendeeDeclinedEvent(this, attendee);
base.RegisterDomainEvent(attendeeDeclinedEvent);
}
}
}