I'm Writing a simple pong game in C# and XNA 4.0 to learn unit testing. The tools used are TestDriven.NET and NUnit, all newest versions. The problem is, if I test the code with VS2010 internal debugger, everything runs fine, but when I use "Run Test(s)" from menu, the application chokes with error:
Test 'WindowsGame1.Game1.TestGameMenu' failed: Microsoft.Xna.Framework.Content.ContentLoadException : Error loading "SpaceBackground". File not found.
----> System.IO.FileNotFoundException : Error loading "Content\SpaceBackground.xnb". File not found.
(some more below...)
So it stops when the first textre is going to be loaded. What's going on?
If you want to check the code out, download it here http://www.mediafire.com/?qwnkmyqheum