Sunday, March 7, 2010

AxUnit Unit Testing framework

I'm doing unit testing in my daily work and welcome the SysTest unit testing framework that was provided with Dynamics ax 4.0.

It works well, but I like the assertion syntax found in NUnit better, so I decided to implement my own extension to the SysTest framework.

Now you can write assertions like this:

    assert.that(actual, is.equalTo(expected));
    assert.that(0.3333, is.equalTo(0.33).within(2).decimals());
    assert.that(actual != null);

I think the syntax makes the test more readable.

You can download the framework at Codeplex

No comments:

Post a Comment