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
Hi @slorello89. I'd like to extract an interface for the RedisConnectionProvider class, to allow mocking/substitution for unit testing.
My use case is that I have an ASP.NET Core Web API project injecting a RedisConnectionProvider object into my caching implementation class:
Program.cs
Caching Implementation:
I am currently unable to unit test this class, as our chosen mocking tool (NSubstitute) requires either an interface or a concrete implementation containing virtual methods it can override. I would therefore like to create an IRedisConnectionProvider interface and to update each reference to RedisConnectionProvider to use this interface.
Will raise a PR with a simple implementation.
The text was updated successfully, but these errors were encountered:
Hi @slorello89. I'd like to extract an interface for the RedisConnectionProvider class, to allow mocking/substitution for unit testing.
My use case is that I have an ASP.NET Core Web API project injecting a RedisConnectionProvider object into my caching implementation class:
Program.cs
Caching Implementation:
I am currently unable to unit test this class, as our chosen mocking tool (NSubstitute) requires either an interface or a concrete implementation containing virtual methods it can override. I would therefore like to create an IRedisConnectionProvider interface and to update each reference to RedisConnectionProvider to use this interface.
Will raise a PR with a simple implementation.
The text was updated successfully, but these errors were encountered: