Telerik blogs
  • Productivity Testing

    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 3 min read
  • Productivity

    Slides, Source Code and Video to the “Getting Started with JustMock” Webinar Now Available

    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.
    December 07, 2012 2 min read
  • Productivity

    Why Mocking Matters

    How does mocking benefit me?  That’s a question I hear a lot as I travel around the world giving talks.  So before we dive into how to use a mocking tool like JustMock, let’s discuss why this is important and the benefit that mocking provides over other techniques like Fakes. In my post on Why SOLID Matters, we refactored a small piece of code to be more SOLID.  Granted, it was a simplistic example, but good for illustrating several key points on SOLID.  We will continue using the same code to discuss the benefits of Mocking.  As a refresher, we ended...
    October 10, 2012 10 min read
  • Productivity Testing

    Getting Started with NUnit, NUnit.Should, and JustMock

    Technorati Tags: TDD,Test Driven Development,JustMock,JustCode,NUnit,NUnit.Should,Mocking Before diving into mocking with JustMock, it’s important to note that JustMock is a mocking framework, and not a testing framework.  Test frameworks allow for creating Test Fixtures, which are .NET classes decorated with the appropriate attributes so they are picked up by a Test Runner.  Test are created within a Test Fixture by writing methods (with the appropriate attributes) that exercise your code (also referred to as the System Under Test) and report the results.  Test Runners are programs that will run your tests.  There are many free testing frameworks available for .NET developers, including MSTest (included...
    October 05, 2012 12 min read
  • Release

    New Mocking Capabilities in JustMock Q3 2011 SP

    Telerik JustMock received many new features in the service pack for the Q3 2011 release, enhancing the mocking framework’s impressive ability to mock almost everything. Let’s take a look at a few highlights of JustMock Q3 2011 SP. Mock Inside a Threadpool Mock objects can be accessed inside of another thread and work as expected. var mockable = Mock.Create<Mockable>(); Mock.Arrange(() => mockable.IsMocked).Returns(true); bool mocked = false; var latch = new WaitLatch(); ThreadPool.QueueUserWorkItem(cookie => { try { mocked = mockable.IsMocked; } finally { ...
    February 03, 2012 3 min read