Unit Test Redis Cache

2 posts, 0 answers
  1. Samarendra
    Samarendra avatar
    1 posts
    Member since:
    Aug 2016

    Posted 04 Aug Link to this post

    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.
  2. Svetlozar
    Admin
    Svetlozar avatar
    269 posts

    Posted 09 Aug Link to this post

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top