Tag: Unit Testing

  • Unicorn Series–Automated Testing

    Unicorn Series–Automated Testing

    Headline: The only real way to be Agile is if you have healthy automated testing. (See Unicorn Series Overview for other topics.) Results Let’s start with some results of the practices described here: Yes – better, faster, cheaper. Overview The most agile teams seem to have short sprints. Ours are 1 week. Yes – 1…

  • Unicorn Series Overview

    Unicorn Series Overview

    Headline: All the modern software development practices really do make significant business impact. This focuses on Agile Software Development. Contents Disclaimer: As usual, there is not information in this series that would be considered proprietary information for C&C Reservoirs. This is the overview and index for a series on software development practices the team I’m…

  • How can I unit test unsubscribing from an event? (C#)

    I’ve seen some strange bugs that occur when you don’t properly unsubscribe from events. But it seems I’m always stuck when it comes to unit testing that. Well, I use Moq for most of my mocking and there are some techniques you can use for testing that your subscribed, namely by Raise(ing) the event in…

  • How to Write Bad C# Code

    In case you’re afraid Microsoft might help you write some good C# code, here’s a list of the top tips to make sure you still write bad C# code. Now I’m sure that’s not the objective, but when you read this post you’ll frankly wonder why it is that we still see so much bad…

  • Visual Studio 2012 testmc Code Snippet

    Headline: This contains the code for the first code snippet I install when I have a new installation of Visual Studio along with the steps to get it into the right location. The Result The first time I saw this format for unit tests was in some work the Microsoft ASP.NET MVC (Model View Controller)…

  • Where is TestContext.BeginTimer()?

    This post outlines my (with help of others) solution to keeping my unit tests working in the absence of TestContext.BeginTimer() and TestContext.EndTimer(). These seem to be missing in Visual Studio 2012 and I can’t find any posts… so I assume no one else uses this pattern. What’s Broken? Here is a sample unit test that…

  • TDD Saves Time When You Need It Most

    In the life of a project when is time most precious? The first day? Or the last day? Writing unit tests makes sense, but are you disciplined enough to write them? I understood the value of writing unit tests and had used them on numerous projects. I knew you should write them but I had…

  • A Strategic Case for Unit Testing

    A Strategic Case for Unit Testing

    There is a certain level of velocity and quality that you will never reach without effective unit testing. I’ve had an unusual number of queries about unit testing during the past few days. As a result I thought I would put a more complete description together. Definition I’m not going to spend a great deal…