Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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);
        }