Description
NRedisStack Version: 0.10.0 or higher
Description:
Hi!
As soon as I update version of NRedisStack
to 0.10.0
or higher, my unit tests with IDatabase
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!