A lot of books and websites all reference a program called NUnit which is a graphical or command line way to run the tests you create through the code within your class library. After trying and succeeding on the simple examples. I thought I could be able to manipulate this to work it with the code we have but it just isn't possible.
Here are some examples of the what I tried to achieve:
Here is a function within the CubicSpline class. I add this to a file then tried to do an assertion on it.
This all compiled and built successfully however when I tried to test it through the use of NUnit which uses test runners in the code to find which parts of the code are the tests
Above is the result I got from trying to run a simple assertion of the code above. I dont know if that error is readable but it says:
ClassLibrary1.TestLargest.TestGetCubicSpline:
System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Xna.Framework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d' or one of its dependencies. The system cannot find the file specified.
Which simply means that this Unit testing will not work for XNA framework which is difficult when the our whole project is built using XNA framework


No comments:
Post a Comment