• Automocking gets even better with the improvement of event mocking in the latest service pack. Read more to see how easy it is!
  • Profiled Automocking is here! Check out the latest from JustMock with this hot new feature in the 2013 Q1 release.
  • Automocking with JustMock

    Sunday, March 10, 2013 by Phil Japikse | Go comment!
    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. Read how JustMock helps with automocking.
  • Mocking is all about making it easy to isolate the system under test in unit tests. In non profiled mocking, this is typically done by creating a proxy for an interface, and arranging the methods that will be called on the proxy. Mocking frameworks like JustMock determine matching calls not only based on the method signature, but also by the values of the arguments passed into the method. JustMock provides many mechanism to tune how the matching is done.
  • KickStart Your .NET Mocking

    Monday, February 04, 2013 by Phil Japikse | Comment 1
    Getting started with mocking can be hard. In this article, I describe the path that I took on my way to becoming a frequent mocker.
  • Asserting Behavior with JustMock

    Thursday, January 10, 2013 by Just* Team | Comments 2

    JustMock is a great tool for abstracting dependencies in unit tests, and the new automocking feature makes it even faster to develop unit tests.  Another great feature in JustMock and JustMock Lite is the capability to assert the behavior of your system under test. 

    Traditional TDD (Test Driven Testing) unit testing typically tests for state.  Did the user get logged in? Did the user’s shopping cart get loaded?  Important tests, of course.  But that only tests the end result of the method.  If the user does NOT successfully login, and the cart is not reloaded, is that because the call to the repository was never called? Or because some error happened that didn’t reload the cart in this particular use case?  The state of the application is correct, but is that because it executed the expected behavior, or because we got lucky? 

  • Mocking Property Getters and Setters

    Wednesday, December 26, 2012 by Just* Team | Go comment!
    In typical unit testing scenarios, mocking property getters and setters isn't high on the list of areas of concern. Where it usually comes into play is when an entity’s properties’ values (or the act of setting them) are part of the scaffolding, or behavior for the system under test.
  • Mocking Constructors with JustMock

    Thursday, December 13, 2012 by Just* Team | Go comment!
    In .NET there are two types of constructors, instance constructors and static constructors. Instance constructors are called when objects are instantiated, while static constructors get called before any member of the class is invoked for the first time.
  • Chris and I wanted to thank you all for attending the “Getting Started with JustMock” webinar. The slides, source code and recorded video are now available for you to explore. If you have any questions, then feel free to leave a comment below or send us an email/tweet. I encourage you to go ahead and download your own copy of JustMock and start experiencing Fast, Fluid Unit Testing for yourself. WEBINAR MATERIALS Slides, Source Code and the Recorded Webinar Video is now available for you to enjoy.
  • Future Mocking

    Wednesday, November 21, 2012 by Just* Team | Go comment!

    Mocking legacy code is hard. Especially, if it’s a third-party library and you have little control over how it’s written. It is even more difficult to unit test a type that is instantiated internally. One can argue that it should be refactored to accept dependencies via constructor injection.  However, constraints such as time, budget, experience with the offending code, or even access to the source often prevent paying down the technical debt accumulated in these legacy systems.  

    This post will show you how to mock an external library (concept) where it calls a login service class that cannot be sent...