Project Description

AxUnit is a Unit Testing framework for use with Microsoft Dynamics Ax (X++).

It feautures a new assertion syntax and a complete mock object framework.

public void testMyMethod()
    fakeObject = expect.newFakeFor(classnum(MyClassToFake)); //Create mock objects automatically
    expect.on(fakeObject)                                    //Set expectations using the readable syntax

    assert.that(actual, is.equalTo(expected));                   //Use the "is." syntax for simple and easy to read assertions
    assert.that(0.3333, is.equalTo(0.33).within(2).decimals());
    assert.that(myCollection, _.hasItem(_.either(_.equalTo('foo')).or('bar'))); //Use the flexible "_." Matchers to compose advanced, yet readable assertions
...see the Documentation Tab for further examples.

AxUnit is based on the standard SysTest framework that came with Dynamics Ax 4.0 and is inspired by JUnit and JMock.....may their creators live long and prosperous.

If you wan't to know about other projects I have, see my blog on

Last edited Apr 29, 2011 at 3:19 PM by JesperJensen, version 7