We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When testing code that has a dependency on ITransactionalSession, we don't have the PublishedMessages, SentMessages, etc API.
PublishedMessages
SentMessages
Not sure if this is the right repo to raise this issue, if not please feel free to move it.
It would be nice to have a TestableITransactionalSession for ITransactionalSession.
TestableITransactionalSession
ITransactionalSession
made a simple wrapper over TestableMessageSession and I use the underlying TestableMessageSession for assertions:
TestableMessageSession
class MockTransactionalSession(IMessageSession inner) : ITransactionalSession { public ISynchronizedStorageSession SynchronizedStorageSession => null!; public string SessionId => null!; public Task Commit(CancellationToken cancellationToken = default) => Task.CompletedTask; public void Dispose() { } public Task Open(OpenSessionOptions options, CancellationToken cancellationToken = default) => Task.CompletedTask; public Task Publish(object message, PublishOptions publishOptions, CancellationToken cancellationToken = default) { return inner.Publish(message, publishOptions, cancellationToken); } public Task Publish<T>(Action<T> messageConstructor, PublishOptions publishOptions, CancellationToken cancellationToken = default) { return inner.Publish(messageConstructor, publishOptions, cancellationToken); } public Task Send(object message, SendOptions sendOptions, CancellationToken cancellationToken = default) { return inner.Send(message, sendOptions, cancellationToken); } public Task Send<T>(Action<T> messageConstructor, SendOptions sendOptions, CancellationToken cancellationToken = default) { return inner.Send(messageConstructor, sendOptions, cancellationToken); } }
No response
The text was updated successfully, but these errors were encountered:
@sanisoclem, Thank you for the feature suggestion. We will look into adding this in the future.
Sorry, something went wrong.
also adding a vote to this feature request
No branches or pull requests
Describe the feature.
Is your feature related to a problem? Please describe.
When testing code that has a dependency on ITransactionalSession, we don't have the
PublishedMessages
,SentMessages
, etc API.Not sure if this is the right repo to raise this issue, if not please feel free to move it.
Describe the requested feature
It would be nice to have a
TestableITransactionalSession
forITransactionalSession
.Describe alternatives you've considered
made a simple wrapper over
TestableMessageSession
and I use the underlyingTestableMessageSession
for assertions:Additional Context
No response
The text was updated successfully, but these errors were encountered: