• Testing

    Handling Arguments in JustMock Arrangements

    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.
    February 21, 2013
  • .NET

    Top 5 TDD Mistakes

    Our guest blogger, the Contented Coder, Bradley Braithwaite shares the 5 most common TDD mistakes that he has encountered over the years.
    January 24, 2013
  • .NET

    Mocking Property Getters and Setters

    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.
    December 27, 2012
  • .NET

    Mocking Constructors with JustMock

    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.
    December 13, 2012
  • .NET

    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. Background The Dependency Inversion Principle states: High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions. As more developers follow this and the rest of Robert Martin’s SOLID principles, methods and classes become much smaller with dependent objects injected into them, typically through constructor injection. As additional dependencies are needed (or the code is refactored to improve dependency isolation), the signatures of...
    November 07, 2012