ReSharper test runner – hidden thread exceptions

By Tim Lloyd, May 14, 2010 4:31 pm

We use the ReSharper test runner here at GojiSoft to run NUnit tests from within Visual Studio. It’s a great test runner, but doesn’t play nicely with multi-threaded components where exceptions may occur on non-test threads. Unhandled exceptions on non-test threads are hidden and tests which should fail, instead pass. Here’s a very very contrived example:

Continue reading 'ReSharper test runner – hidden thread exceptions'»

C# Coding standards using ReSharper

By Tim Lloyd, May 10, 2010 6:41 pm

Having coding standards can help improve code readability and maintenance across a team, but they can be a pain if they have to be manually followed and enforced. This article describes how we used ReSharper 5 to make applying coding standards a lot less painful.

Continue reading 'C# Coding standards using ReSharper'»

Software infrastructure for an ISV on a shoestring budget

By FrederikB, May 10, 2010 3:58 pm

When you’re bootstrapping a business, you typically can’t afford to buy all the software you’re familiar with from your corporate or VC-funded past. It’s hard to go cold turkey on the tool set that’s become second nature. You could see this as another hurdle that’s keeping you from starting your own ISV, or see it as an opportunity to find better tools for less money. Here at GojiSoft when we first started we spent a fair bit of time looking around for good yet affordable tools to run a Windows and .NET based software development shop.

Continue reading 'Software infrastructure for an ISV on a shoestring budget'»

Event Sequence Unit Testing – Conclusion

By Tim Lloyd, April 27, 2010 1:25 am

A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.

Continue reading 'Event Sequence Unit Testing – Conclusion'»

Event Sequence Unit Testing – Part 4

By Tim Lloyd, April 22, 2010 4:07 pm

A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.

Continue reading 'Event Sequence Unit Testing – Part 4'»

Event Sequence Unit Testing – Part 3

By Tim Lloyd, April 22, 2010 4:06 pm

A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.

Continue reading 'Event Sequence Unit Testing – Part 3'»

Event Sequence Unit Testing – Part 2

By Tim Lloyd, April 22, 2010 4:05 pm

A lot of the development we’ve been doing here at GojiSoft has involved event driven component development. This four part article describes how we went about developing a generalized event testing framework to more easily write unit tests that codified event firing sequences.

Continue reading 'Event Sequence Unit Testing – Part 2'»

Event Sequence Unit Testing – Part 1

By Tim Lloyd, April 22, 2010 4:04 pm

A lot of the development we’ve been doing here at GojiSoft has involved event driven component development.  We didn’t like the endless boiler plate unit test code that we had to write to unit test classes that raise events, so we came up with a few helper classes that make it effortless.  A test now looks like this:

[Test]
public void TestEventRaisingSequence()
{
      var myClass = new MyEventRaisingClass(); 

      Action test = () => { myClass.RaiseA(); myClass.RaiseB(); }; 

      var expectedSequence = new[] { "EventA", "EventB" }; 

      EventMonitor.Assert(test, myClass, expectedSequence);
}

The framework handles synchronous & asynchronous event raising, as well as property change notification (INotifyPropertyChanged).

Continue reading 'Event Sequence Unit Testing – Part 1'»

Fixing PostSharp and Code Analysis on a build machine without Visual Studio

By FrederikB, April 15, 2010 5:11 pm

When you’re developing with Visual Studio, it calls MSBuild and the C# compiler, to compile your solution, both of which come with the .NET framework.  On your build machine, you don’t need a copy of Visual Studio, you can get by with invoking MSBuild against your solution file. This keeps your build setup cleaner and cheaper.  It does mean you don’t get access to features like the Code Analysis feature of Visual Studio 2010 on your build box, unless you hack it.  If you have Code Analysis enabled on your dev box, but not installed on your build box, this setup, combined with Post-Sharp 2 will cause problems.

Continue reading 'Fixing PostSharp and Code Analysis on a build machine without Visual Studio'»

Getting .Net 4.0, Team City, MSBuild and Nunit to play nice.

By FrederikB, April 14, 2010 3:46 pm

Now that Visual Studio 2010 has been released, everyone who wants to upgrade gets to go jump through a bunch of fiddly hoops to get the build system to play nice again. Here are the fixes I had to apply to our build system.

Continue reading 'Getting .Net 4.0, Team City, MSBuild and Nunit to play nice.'»