public void should_update_state_to_requested()
        {
            var fixture = new Fixture();
            var sut     = fixture.Create <Appointment>();

            var @event = new AppointmentRescheduled(sut.Id, sut.ScheduledOn.AddDays(2));

            sut.Apply(@event);

            sut.State.Should().Be(AppointmentState.Requested);
        }
        public void should_set_scheduled_on_correctly()
        {
            var fixture = new Fixture();
            var sut     = fixture.Create <Appointment>();

            var @event = new AppointmentRescheduled(sut.Id, sut.ScheduledOn.AddDays(2));

            sut.Apply(@event);

            sut.ScheduledOn.Should().Be(@event.Date);
        }
Exemple #3
0
 public void Apply(AppointmentRescheduled @event)
 {
     ScheduledOn = @event.Date;
     State       = @event.State;
 }