Andrew Stopford's Weblog

@poobah

News

Articles

Family

Old Blogs

Whats do you like most in your IoC of choice?

Question for you dear reader, what do you like most in your IoC framework of choice, what is lacking and what would you want to see?

NUnit 2.5 RTM

Charlie and the NUnit team have been working hard on NUnit 2.5 and over the last weekend the NUnit 2.5 RTM was released, a huge kudos to Charlie and the team on getting this out. NUnit 2.5 has loads of new goodies, parameterized tests (like MbUnit) and Theories (like JUnit and XUnit.net) caught my eye, seeing parameterized tests in NUnit really shows how much MbUnit has brought this concept into the .NET mainstream and it is exciting to see in NUnit. So lets take a look.

   1:  using NUnit.Framework;
   2:   
   3:  [TestFixture]
   4:  public class SummerTest
   5:  {
   6:      [Test, Sequential]
   7:      public void TestAddSequential([Values(2,4)] int expected, 
   8:          [Values(1,2)] int value1, 
   9:          [Values(1,2)] int value2)
  10:      {
  11:          Assert.AreEqual(expected, value1 + value2);
  12:      }
  13:   
  14:      [TestCase(2, 1, 1)]
  15:      [TestCase(3, 1, 2)]
  16:      public void TestAddCombin(int expected, int value1, int value2)
  17:      {
  18:          Assert.AreEqual(expected, value1 + value2);
  19:      }
  20:  }

In both cases we are seeking to add two numbers together and compare to a result. I have shown two slightly different ways of approaching the same test, the first test sets values on the sums and expected within the parameter, the second test shows how you can also split them out.

The only thing I recommend is using the TD.NET beta with NUnit 2.5 or your tests won't work correctly.

Posted: May 05 2009, 11:00 PM by andrewstopford | with 2 comment(s)
Filed under: ,
BDD with RSpec\Cucumber\IronRuby.

A great deal of debate has been going on about Alt.NET, what it means, what it does etc. For me the concept means to learn something new and not just in the camp that is my bread and butter but in any sphere of our industry. The one place I have been watching with the most interest is the Ruby camp, sure Rails is getting all the press but what pikes my interest the most is the developments the Ruby community have made in BDD with tools such as RSpec and Cucumber (Cucumber is one of the coolest things I have ever seen).

In the .NET world we have IronRuby if you want to mix and match Ruby and your .NET skills, sadly IR does not play too well with Cucumber. If you take a look at this wiki page while the IR igems lets you obtain cucumber and rspec it seems to do very little. Instead you download MRI and install the Cucumber and RSpec gems then create a icucumber.bat file, one thing to note at this stage is the paths to IronRuby and Ruby may be different to the paths listed in the wiki example. My icucumber looks like

@ECHO OFF
REM This is to tell IronRuby where to find gems.
SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8
@"C:\ironruby\bin\ir.exe" "c:\ruby\bin\cucumber" %*


After installing IR 0.3 and the MRI from the click once installer (makes installing Ruby a breeze).

My experiments came to halt when I tried to run IR and Cucumber with a C# example due to a IR bug but I like what I see and I'll be spending more time with Ruby\RSpec and Cucumber over the coming months.

On a side note I also tried AutoSpec which runs RSpec tests for you as you save changes, auto running of tests is something that Gallio has added to test runners such as Icarus.

MbUnit 3 RTM

MbUnit 3 has been a long, long labour. It started around early fall of 2007 and under Jeff had grown and grown into todays final release. Along the way Gallio was born which as a Test Automation Platform this not only acts as the platform for MbUnit 3.0 but is intended as a complete stand alone infrastructure for test frameworks and it offers a great deal of exciting possibilities.

Jeff has today announced v3.0.6 Update 1 when in fact MbUnit has been stable since v3.0.4, sure there are bugs and changes to make but consider v3.0.6 as final, in other words MbUnit v3 is RTM.

There are a great deal of reasons why you should consider upgrading to MbUnit 3.0 from MbUnit 2.*. MbUnit 3.0 was a ground up rewrite, everything from the framwork to the installer is all new code, we threw out v2 and started again and the result is very powerful framework that while lending a great deal to the work Peli and the MbUnit team did is great deal more powerful. Other than offering a vaster range in asserts (including lamba based asserts) and more powerful row, typefixturefactory and combinatorial pairwise based tests MbUnit now also offers features such as contract verifiers and parallel processing. Gallio provides MbUnit with the runner infrastructure and the list of supported runners is amazing, like MbUnit v2 you can still run MbUnit v3 in MSBuild, NAnt, TD.Net, CruiseControl, commandline (much more ehanched in v3) and GUI (also vastly enhanced in v3) but now tools such as TeamCity, VSTS, Resharper, Powershell, NCover, TypeMock and even AutoCAD. Finally MbUnit v3 supports the MS MVC framework just as v2 does.

 I am excited about MbUnt v3 and I do want to say a huge thank you to Jeff, Julian, Graham, Yann and the whole team for so all their hard work in making this happen.

 

Posted: Apr 02 2009, 10:34 PM by andrewstopford | with 4 comment(s)
Filed under: ,
Technology Redundancy

Technology is moving at an ever changing pace, in the Microsoft stack alone it seems to change every month. As a developer the risk you face is massive if you don't keep up and keeping up is getting ever harder. Some developers have the spare time to keep up however if you have family or work long hours (or both) and you have no spare time. Some jobs afford you the time to look at new technology but that time has to be balanced with getting the job done, most jobs put the needs of the busines\customer first and technology last (if the job gets done it gets done). Technology adoption is far slower than technology advancement but as developers we need to know the latest and greatest or risk technology redundancy. What do you do to stay ahead?

VS10 and OSS

Jason Zander, GM of Visual Studio gave an interview on the reg where he talks about OSS and VS10. Putting aside any license issues what I am keen to learn about is the kinds of existing projects that you would want to see embrace this from the current .NET OSS offerings and the kinds of features\projects that you would want to see from this. Would you want the same kind of support that IBM have created for Eclipse with the same kind of community projects. Loads of great things that could spawn from this.

Posted: Feb 27 2009, 12:15 AM by andrewstopford | with 1 comment(s)
Filed under: ,
StyleCop for R# goes RC

Howard has announced that the StyleCop addon for ReSharper has reached RC.

VS10 new UI

The VS10 UI is taking shape, it still looks very much like the UI in the PDC build but with some tweaks.

  • Multi-screen support, the screen shot does not show how it works in action but the things you want\need in this you should start shouting about.
  • Editor changes, expand, collapse, works for you or not, let me know.
  • Extensions, MEF powered, the new manager shows how rich this eco system is going to get.

Sorry for the long delay in posts, first time I have ever missed a month but crazy, crazy busy.

Posted: Feb 24 2009, 08:51 PM by andrewstopford | with 3 comment(s)
Filed under: ,
2009 ahead

The last post of the year and I normally look back at the year, however have not paid much attention to 2008, here's why.

Yes thats my little girl, playing baby laptop smash (knocking keys off).

Happy new year.

Does the .NET community need an Eclipse?

I can't help but admire Eclipse, at its roots it just a shell that you can adjust at will to make the editor what ever you want. From this has sprung a rich eco system with ready packaged editor tweaked downloads for all your coding needs. In it's native Java market Eclipse is not alone but lets you do what ever suits you, I admire that in an editor. The big question is dear reader would a project like Eclipse ever float in .NET land?

Posted: Dec 29 2008, 10:47 PM by andrewstopford | with 9 comment(s)
Filed under:
More Posts Next page »