XSLT Unit Tests
From nUML
Contents |
Building
Currently, the unit tests are only built on the Windows platform using Visual Studio. The unit test are only available in the model_io branch.
Use subversion to checkout https://numl.svn.sourceforge.net/svnroot/numl/branches/model_io/numl to a directory.
Download and install the NUnit code from http://www.nunit.org/.
Download and install the Microsoft XmlDiffPatch code from http://msdn2.microsoft.com/en-us/library/aa302294.aspx.
Open the nUML\test\XsltUnitTest.sln.
Set the reference paths of the XsltUnitTest project to include:
- path to nUnit, i.e C:\Program Files\NUnit 2.4.2\bin\
- path to XmlDiffPatch, i.e. C:\Program Files\XML Diff\bin\Debug\
Set the debug Start Action of the XsltUnitTest project to run nUnit:
Start external Program: C:\Program Files\NUnit 2.4.2\bin\nunit.exe
Build the XsltUnitTest project.
Running
GUI
Run or debug the XsltUnitTest project.
In the nUnit GUI, choose Open from the File menu and select the XsltUnitTest.dll file from the target (Debug) directory.
Select the tests to run from the tree view on the left and click the Run button.
Successful tests are shown green while failed tests are shown in red.
Console
You can also run the nUnit console application:
C:>nunit-console.exe XsltUnitTest.dll NUnit version 2.4.2 Copyright (C) 2002-2007 Charlie Poole. Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. Copyright (C) 2000-2002 Philip Craig. All Rights Reserved. Runtime Environment - OS Version: Microsoft Windows NT 5.1.2600 Service Pack 2 CLR Version: 2.0.50727.832 ( Net 2.0.50727.832 ) .........F.F Tests run: 10, Failures: 2, Not run: 0, Time: 2.453 seconds Failures: 1) XsltUnitTest.SimpleTest.TestStereotype : Model differs from input: __ImplModel list 'NestedPackage' was different object[1] not found - MyProfile at XsltUnitTest.SimpleTest.TestStereotype() in C:\nUML\test\SimpleTest.cs:line 428 2) XsltUnitTest.SimpleTest.TestStereotype_v1_2 : Model differs from input: __ImplModel list 'NestedPackage' was different lists have different count - 2 & 1 at XsltUnitTest.SimpleTest.TestStereotype_v1_2() in C:\nUML\test\SimpleTest.cs:line 525

