Sunday, January 3rd, 2010
I spent a bunch of time over the holidays getting to know F# a bit better. I think I now consider myself to be truly dangerous with it.
A couple of things which repeatedly bit me as I stumbled through learning F# as a n00b.
Tags: F#, Gotchas, TDD, xUnit
2 Comments »
Tuesday, September 8th, 2009
I’ve been using xUnit.net to run some basic acceptance tests. Obviously xUnit is a unit test framework first and foremost but I don’t have a problem with reusing the framework provided you’re really clear about which tests are unit tests and which tests are not. I created an AcceptanceTest ...
Tags: C#, Coding, Continuous integration, TDD, xUnit
No Comments »
Wednesday, June 10th, 2009
Someone at p&p just asked me this and I thought it was worth blogging about.
Suppose I have an interface IIntegrate that I’ve implemented for a number of concrete types within my application. In principle I can use an xUnit Theory to test the behavior of each interface. Something like this:
...
Tags: Coding, TDD, xUnit
2 Comments »
Tuesday, April 14th, 2009
I’ve updated Dealing With Rounding Errors in Numerical Unit Tests to include some more features based on some of the comments I’ve received. If you used the original source code then best check the updated version which deals with the case where the expected value is zero a lot better.
Tags: Coding, TDD, Technical computing, xUnit
No Comments »
Monday, December 1st, 2008
I've been writing some unit tests which attempt to verify some mathematical modeling results. Here's a test that creates a physical model (of a universe) containing some stars and verifies the initial energy of the system. [Fact]
public void Energy()
...
Tags: Coding, TDD, Technical computing, xUnit
7 Comments »
Thursday, November 27th, 2008
Thanks to... Chris Kimball and NPR for their tips that helped in my quest to bake the perfect Raspberry pie for The Susan. The secret, as with all things, is in the alcohol you use. Seriously, the secret to a light crust is using more alcohol and less water. ...
Tags: Trivia, xUnit
No Comments »
Monday, July 21st, 2008
Ever discovered people on your team have gotten into the habit of writing slow unit tests? Tests that take half a minute to execute, that bog down both your development and your build server?
With xUnit.net you can extend the Fact attribute to set the test timeout. In the example below ...
Tags: TDD, xUnit
1 Comment »
Tuesday, June 24th, 2008
I was mucking around with code snippets over the weekend - it killed the time in between feeling sick. As my unit testing framework of choice is XUnit I thought I've have a go at adding a snippet or two around that.
xUnit already comes with a nice code snippet for ...
Tags: C#, Code snippets, TDD, Visual Studio, xUnit
No Comments »
Thursday, June 5th, 2008
The System.Data.Linq.DataContext class exposes a TextWriter as the Log property allowing you to monitor the SQL that's getting executed under the covers. The trivial usage of this is to simply set the property to Console.Out and watch the results.
Given that I was adding the Enterprise Library 4.0 Logging Block to ...
Tags: C#, Coding, EntLib, Linq, xUnit
1 Comment »
Thursday, April 24th, 2008
Brad's blog announces the release of xUnit 1.0 RTM. Well worth the wait I'm sure.
Technorati Tags: Unit testing,TDD,xUnit
Tags: Coding, TDD, xUnit
No Comments »