public void should_update_state_to_rejected() { var fixture = new Fixture(); var sut = fixture.Create <Appointment>(); var @event = new AppointmentRejected(sut.Id, "nobody available"); sut.Apply(@event); sut.State.Should().Be(AppointmentState.Rejected); }
public void should_set_rejection_reason_correctly() { var fixture = new Fixture(); var sut = fixture.Create <Appointment>(); var @event = new AppointmentRejected(sut.Id, "nobody available"); sut.Apply(@event); sut.RejectionReason.Should().Be(@event.RejectionReason); }
public void Apply(AppointmentRejected @event) { RejectionReason = @event.RejectionReason; State = @event.State; }