Skip to content
New issue

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

Moq Issue when trying Mock EventStore Method #13

Open
no1melman opened this issue Dec 23, 2021 · 0 comments
Open

Moq Issue when trying Mock EventStore Method #13

no1melman opened this issue Dec 23, 2021 · 0 comments

Comments

@no1melman
Copy link
Owner

no1melman commented Dec 23, 2021

I get this annoying error when trying to mock the event store...

// Get error here... bugger
// Non-overridable members (here: EventStoreClient.SubscribeToStreamAsync) may not be used in setup / verification expr
mockClient.Setup(fun x -> x.SubscribeToStreamAsync(
"Test Stream",
It.IsAny<Func<StreamSubscription, ResolvedEvent, CancellationToken, Task>>(),
resolveLinkTos = false,
subscriptionDropped = It.IsAny<Action<StreamSubscription, SubscriptionDroppedReason, exn>>(),
configureOperationOptions = It.IsAny<Action<EventStoreClientOperationOptions>>(),
userCredentials = It.IsAny<UserCredentials>(),
cancellationToken = It.IsAny<CancellationToken>()))
.Callback<string, Func<StreamSubscription, ResolvedEvent, CancellationToken, Task>>((fun n evAppeared ->
let toFire = task {
do! releaseTrigger.WaitAsync() // this will wait for the subscription to be created below
evAppeared.Invoke(null, reco, cts.Token) |> ignore
}
()))

Non-overridable members (here: EventStoreClient.SubscribeToStreamAsync) may not be used in setup / verification expr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant