pmMDA.NET test guide
NUnit
pmMDA.NET is tested with NUnit, a
testing framework for .NET.
Tests
pmMDA.NET.DOG
For this test the UML model
pmMDA.NET.Test.zargo is used. The model can be
viewed with Argo UML.
Test steps
-
Create a test database.
-
Execute the create tables script generated by pmMDA.NET.
-
Execute the scripts for the data integrity.
-
Test the properties.
-
Create a few data objects which are defined in the namespace
PmMda.Net.Tests.Properties of the UML model.
-
Fills the properties of the data objects with values.
-
Store the data objects to the database using
PersistenceHandler
.
-
Load the data objects to other data object instances than the saved data objects.
-
Compare the id and the property values of the loaded and saved data objects.
-
Test the indexed properties.
This test works the same way as the test for the properties. All three collection types
(Bag, Map, List) are tested.
-
Test Inheritance.
This test works the same way as the test for the properties. The UML model
defines the same class hierachy for each
inheritance strategy, so every inheritance
strategy is tested.
-
Test lightweight.
This test works the same way as the test for the properties. The data objects get
loaded in their lightweight representation. Some lightweight properties and indexed
properties are used to compare the data of the data objects (saved) and the lightweight
objects (loaded).
How to test
-
Open the pmMDA.NET source code with visual studio 2003
(source\pmMDA.NET\pmMDA.NET.sln).
-
Rebuild the whole solution.
-
Download and start NUnit.
-
Open the assembly source\pmMDA.NET\pmMDA.NET.Tests\bin\debugPmMDA.NET.Tests.exe
in NUnit.
-
Start the tests (Hit the run button in NUnit).
-
Enter the connection data which is used to connect to a MySQL database. The
user needs rights to create and modify databases and tables.
-
Green bullets mean the test has been successfull. Red bullets
indicate errors.