This is a migrated thread and some comments may be shown as answers.

Unit Test Redis Cache

1 Answer 924 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Samarendra
Top achievements
Rank 1
Samarendra asked on 04 Aug 2016, 01:14 PM
I have created a .NET class library project which internally uses Azure  Redis Cache for caching need in the application. Now, I am going to create a unit test project for class library which is created.
So, I would like to know few things before I start the unit test code for my library.

1) Is it possible to create unit test for the library which I have created internally for the application usage.
2) Can someone give one simple example of set and get an object from Redis cache and subsequently the unit testing code.
3) I am planning to use Telerik JustMock for unit test. Please suggest the right framework which I can use to unit test the cache component.

1 Answer, 1 is accepted

Sort by
0
Svetlozar
Telerik team
answered on 09 Aug 2016, 12:02 PM
Hello,

Thank you for your interest in JustMock. JustMock can be used to mock everything that targets the .NET framework, so it certainly can be used to mock Redis services.

Unfortunately we don't have Redis examples, but we will be glad to help if you share your code with us. It really depends on how you've architectured your services. 

JustMock can be used with every unit testing framework. Some of the popular frameworks are NUnit, xUnit and MsTest so feel free to choose what's best for you. 

You can also review our online documentation for some mocking insights. Let me know if you have any questions. 

Regards,
Svetlozar
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Samarendra
Top achievements
Rank 1
Answers by
Svetlozar
Telerik team
Share this question
or