You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this is desired implementation, maybe it worth to mention this change as breaking one, so users will know that additional mock setup needs to be added, so it will be possible to test classes that have NRedisStack as dependency.
Thank you!
The text was updated successfully, but these errors were encountered:
Hi @dmytrostruk , thanks for the detailed issue!
I am checking if it is possible to solve it somehow so that you can do mocking as before without additional setup.
I will update.
NRedisStack Version: 0.10.0 or higher
Description:
Hi!
As soon as I update version of
NRedisStack
to0.10.0
or higher, my unit tests withIDatabase
mock are failing.Previously, it was possible to mock
IDatabase
easier with:mockDatabase.Setup(x => x.ExecuteAsync(...)).ReturnsAsync(...);
Now, it requires to mock not only
ExecuteAsync
method, but also:IDatabase.Multiplexer
IConnectionMultiplexer.GetServer(...)
IConnectionMultiplexer.GetEndPoints()
IServer.Version
.I believe this is because of this line:
NRedisStack/src/NRedisStack/Auxiliary.cs
Line 75 in 954992e
It was added in this PR:
https://github.com/redis/NRedisStack/pull/180/files#diff-325a736b58343c97ea736c8f94320677e56eb9eaa2f6b8152ca732e41f8fd197R76
If this is desired implementation, maybe it worth to mention this change as breaking one, so users will know that additional mock setup needs to be added, so it will be possible to test classes that have
NRedisStack
as dependency.Thank you!
The text was updated successfully, but these errors were encountered: