Game Development Reference
In-Depth Information
attribute is used to tell NUnit that the class TestPlayer will have a number of
tests in it.
The second attribute is on the function BasicTest . This is a test attribute,
which means the function BasicTest is a test that needs to be run. As
the Player code is written, more of these small test functions will be added to
the TestPlayer class.
Make sure the code compiles by pressing the green arrow or by pressing F5.
A console window will flash briefly, and then quickly disappear again. This
behavior is fine for now.
Running Tests
NUnit has a special GUI program for running tests. NUnit GUI is found in the
Start menu. Once run, it looks like Figure 4.23.
NUnit works on compiled code. Visual Studio compiles the code every time the
green arrow or F5 is pressed. The compiled code is stored in the project directory
(normally, \Projects\PlayerTest\PlayerTest\bin\(Debug/Release)\). The default
Figure 4.23
NUnit GUI on startup.
 
Search WWH ::




Custom Search