This post will show you how to mock an external library (concept) where it calls a login service class that cannot be sent via dependency injection.
Automocking with JustMock
Auto mocking containers are designed to reduce the friction of keeping unit test beds in sync with the code being tested as systems are updated and evolve over time.
Mocking LINQ Queries
In this post, you will see how easy it is to mock a LINQ query using JustMock for a given context.
Abstracting Dependencies with JustMock
But even if you follow the rules of SOLID
and inject all of the necessary dependencies in as interfaces, you are still faced with the fact that you depend on them. This is where mocking comes in to save the day.
Getting Started with NUnit, NUnit.Should, and JustMock
Before diving into mocking with JustMock, it’s important to note that JustMock is a mocking framework, and not a testing framework.
In this post you'll see how to setup a test project and execute some initial tests using NUnit (testing framework), the NUnit Should extensions, and JustMock.