• .NET

    Why Mocking Matters

    October 10, 2012 Share
    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...
  • Testing & ALM

    Another Great CodeStock

    Last week marked another great CodeStock, a two day developer conference in Knoxville, TN.  The organizer, Michael Neel, does a great job of juggling the speakers, schedule, and venue, and the show continues to get better and better! Telerik was once again one of the core sponsors of the conference, as we continue our wide and deep support of the developer community.  I also gave for presentations: Test Driven Development for T-SQL Windows Presentation Foundation for Developers Implementing M-V-VM in WPF (Have you tried our WPF Controls?) Test The Hard Stuff With JustMock  All of the code can be found on my blog’s...
  • Testing & ALM

    Come Join Us Hawaii

    Technorati Tags: Speaking,.NET,TDD,BDD,WPF,Mocking,Agile,Scrum,Unit Testing I’m getting ready to kick off a crazy month of speaking.  I start Friday, April 1 in lovely Honolulu, HI with 4 talks at the Honolulu SQL (and .NET) Saturday.  I will be presenting: Windows Presentation Foundation for Developers Lessons Learned: Being Agile in a Waterfall Enterprise Introduction to Test Driven Development Mocks, Stubs, and Dependency Injection, Oh My! For more information, you can check out the conference at this link: http://www.sqlsaturday.com/72/eventhome.aspx Chris Eargle will also be there, presenting: Code Like a Ninja: Enhance Your Productivity Secrets of a .NET Ninja What’s New in ASP.NET MVC3: Building Nerd Dinner I...
  • Testing & ALM

    Resolving Compatibility Issue Between JustCode and MSpec

    January 14, 2011 Share
    [Cross posted from www.skimedic.com/blog] Telerik’s JustCode natively supports several test runners, including MSpec. This is great - the JustCode product team has taken on the responsibility to make sure the test runner works with the test frameworks, letting the framework developers focus on building even more awesome frameworks! Occasionally, this can cause an issue, though, as we just discovered here at CodeMash. The latest rev of MSpec introduced breaking changes in the JustCode test runner. While the team is hard at work updating the test runner to be compatible with the latest api, the work around is very simple. Simply change the Copy...
  • Testing & ALM

    Mocking Exceptions and Events with JustMock Free Edition

    December 28, 2010 Share
    [Cross Posted from http://www.skimedic.com/blog] Mocking Exceptions When writing unit tests, it is important to cover not only the successful execution path (commonly referred to as the “Happy” path), but also test the code that gets executed when things don’t go right (commonly referred to as the “Unhappy” path).  Testing for situations where services or databases are unavailable as well as erroneous user input are important aspects of ensuring quality in software.  Remember, if you don’t test it, your users will! We modify the LoginUser method to throw a custom exception when there is an exception is thrown from the LoginService.  To test this,...