We published NatUnit (former NUNIT) on SourceForge today: NatUnit on SourceForge.
Due to naming conflicts with the “real” NUnit, we decided to publish it as NatUnit. However, the internal name is still NUNIT, as Natural module names are restricted to a length of 8 characters which left us with only one character to distinguish between modules, if we used NATUNIT 😉
NatUnit is easy to use, as the following code (a simple test case) shows. The whole framework is written in Natural itself, so you don’t have to use external tools like NaturalONE.
DEFINE DATA
PARAMETER USING NUTESTP
LOCAL USING NUCONST
LOCAL USING NUASSP
END-DEFINE
*
NUTESTP.FIXTURE := 'Example TestCase 1'
*
INCLUDE NUTCTEMP
INCLUDE NUTCSTUB
*
DEFINE SUBROUTINE TEST
*
********************************************************************************
IF NUTESTP.TEST EQ 'compare two equal numbers should pass'
********************************************************************************
ASSERT-LINE := *LINE; PERFORM ASSERT-NUM-EQUALS NUASSP 2 2
END-IF
*
END-SUBROUTINE
*
END
NatUnit is licensed under LGPL v3, so feel free to use it in your (commercial) applications or even help us further develop the framework.
Pingback:L4N (Log4Nat) – a logging framework for Natural (by Software AG) » Stefan Macke