public void CannotScheduleTimeoutIfTimeoutNotHandled() { var saga = new FakeSagaWithoutTimeout() { CorrelationId = GuidStrategy.NewGuid() }; var e = new FakeEvent(); using (var context = new SagaContext(saga.GetType(), GuidStrategy.NewGuid(), e)) { var ex = Assert.Throws <InvalidOperationException>(() => saga.Handle(e)); Assert.Equal(Exceptions.SagaTimeoutNotHandled.FormatWith(saga.GetType()), ex.Message); Assert.False(context.TimeoutChanged); } }
public void CannotScheduleTimeoutIfTimeoutNotHandled() { var saga = new FakeSagaWithoutTimeout() { CorrelationId = GuidStrategy.NewGuid() }; var e = new FakeEvent(); using (var context = new SagaContext(saga.GetType(), GuidStrategy.NewGuid(), e)) { var ex = Assert.Throws<InvalidOperationException>(() => saga.Handle(e)); Assert.Equal(Exceptions.SagaTimeoutNotHandled.FormatWith(saga.GetType()), ex.Message); Assert.False(context.TimeoutChanged); } }