September 2006 - Posts

Eli Lopian's blog

Eli Lopian from TypeMock has started blogging. Simply going on TypeMock's excellent documentation, this will be one to watch.

If you haven't come across TypeMock before, it's a powerful and easy to use mocking framework. It uses the .NET profiler API in order to break the normal rules about what methods can be overridden and mocked.

The enterprise and professional versions of TypeMock come with a feature called Natural TypeMocks. This enables you to mock complex code in a very concise and readable way. If you have some complex legacy code you want to start unit testing, this feature alone will probably pay for itself within the first day! I feel like I have wind in my sails again since I started using it.

Natural TypeMocks is actually a layer on top of a flexible AOP and mocking framework. This AOP framework is included in the free community version of TypeMock. This is the real reason I encourage you to subscribe to Eli's blog. There are all kinds of tricks you could do with this framework. For example you could inject logging probes into 3rd party code, or enforce design by contract style pre and post conditions in your own code. I'm going to twist Eli's arm to write about some of this. ;)

If you already use TypeMock with TestDriven.NET, drop me a note and I'll give you a preview of the future TypeMock integration.

WiX v3 in Visual Studio!

Rob Mensching writes:

Also in 2005, the Visual Studio team approached the core WiX development team about replacing their custom MSI build system with the WiX toolset. Derek was at every meeting with me. Together we answered their questions, discussed timelines and feature requests and ultimately convinced the Visual Studio team to bet on WiX v3 for their next release of Visual Studio. Without Derek's experiences integrating WiX into Office, I'm not sure we could have convinced Visual Studio to pick up the WiX toolset.

Visual Studio to use an WiX as its installer description language! Will this be a new feature in Visual Studio Orcas? Back in my pre-WiX days, .vdproj files caused me so much pain. News of this decision is music to my ears. Way to go Derek, Rob and the WiX team! From a selfish POV I'm sorry to hear Derek is moving on. Best of luck in your mysterious new venture.

Update: I'm afraid I jumped the gun. WiX will only be used to create the MSI file for Visual Studio itself. If you think replacing .vdproj with WiX is a good idea, please leave a note on Rob's informal poll. Hopefully it won't be long before Microsoft is eating their famous dog food. ;-)

Posted by Jamie Cansdale | 5 comment(s)
Filed under: , , ,

TestDriven.NET + TypeMock.NET

I have recently been working with Eli Lopian from TypeMock so ensure that TestDriven.NET and TypeMock.NET work nicely together. TypeMock is a mocking framework that allows virtually any .NET Type to be mocked (the only exception being types defined in mscorlib).

I am now using TypeMock to test certain assemblies that make up the up TestDriven.NET application. These are assemblies use the Visual Studio extensibility model. In the past I have tested this code by creating an instance of Visual Studio and doing integration tests. The problem I have is that I still need to test against Visual Studio .NET 2002 and 2003. I don't always want to have these installed on my development machine.

One possibility is to execute these integration tests whenever code is checked in and picked up by CruiseControl.NET. Unfortunately this means finding problems after the code has been checked in. I much prefer to run my tests and catch bugs before it gets this far!

I'm certainly not advocating using TypeMock in all of your unit tests. There are however some situations where using it makes a lot of sense. I think there is a sweet spot somewhere between unit tests and integration tests that TypeMock is particularly suited for.

You can can download and find more information about TypeMock here. There are community (free), professional and enterprise versions. We have worked out a offer so that if you buy TypeMock.NET and TestDriven.NET together you get 25% off. Since I am using TypeMock myself, you can expect the integration to get better and better. :)

Reflector on Mono 1.1.17

Here's a screenshot of Reflector running on Mono 1.1.17. The tree view seems to work fine. Unfortunately the Dissasembler view is throwing an exception. Still very impressive. I expect it will be working a lot better in the next release. Well done Mono team! :)

Here's the exception the Dissasembler view throws.

Value '-16' must be greater than or equal to 0.

System.Exception

  at System.Windows.Forms.ScrollBar.set_LargeChange (Int32 value) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ScrollBar:set_LargeChange (int)
  at System.Windows.Forms.TextBoxBase.CalculateScrollBars () [0x00000] 
Posted by Jamie Cansdale | with no comments
Filed under: , ,

Mono 1.1.7 and NUnit

On the NUnit developers mailing list Cory Fox writes:

See attached - this is the 1.1.17 latest Mono release running the 2.4
Release Candidate code with the GUI build turned on, under Gentoo Linux.
This is great news, because no special anything was necessary. This
should mean that, with some minor fixes, we should have NUnit GUI
building on Mono/Linux for the 2.4 release!

A little further down Mat writes:

For those experimenting with mono, Reflector runs when using the /compat
switch and so does Paint.NET, among other things.

Did I read that right? Reflector works on Mono! :)

Posted by Jamie Cansdale | 3 comment(s)
Filed under: , , ,
More Posts