private static MeetupAggregate ExecuteCommand(this MeetupAggregate @this, Func <MeetupAggregate> command) { @this.UpdateNumberOfSeats(SeatsNumber.From(numberOfSeats)); @this.UpdateLocation(Address.From(address)); @this.UpdateTime(timeRange); @this = command(); return(@this); }
public static void GivenPublishedMeetup(Action <MeetupAggregate> when, Action <MeetupAggregate> then) { var meetup = new MeetupAggregate(id, title, location); meetup.UpdateNumberOfSeats(seats); meetup.Publish(); when(meetup); then(meetup); }