public void ThrowKeyNotFoundIfSagaTypeUnknown() { var timeout = DateTime.Now.AddMinutes(20); var saga = new FakeSaga { CorrelationId = GuidStrategy.NewGuid(), Version = 0, Timeout = timeout }; var state = Serializer.Serialize(saga); using (var command = Dialect.CreateCommand(Dialect.InsertSaga)) { command.Parameters.Add(Dialect.CreateTypeIdParameter(Guid.NewGuid())); command.Parameters.Add(Dialect.CreateIdParameter(saga.CorrelationId)); command.Parameters.Add(Dialect.CreateTimeoutParameter(timeout)); command.Parameters.Add(Dialect.CreateStateParameter(state)); Dialect.ExecuteNonQuery(command); } Assert.Throws <KeyNotFoundException>(() => SagaStore.GetScheduledTimeouts(timeout.AddMinutes(1))); }