I am trying to deal with NUnit - I installed it and successfully completed it within the framework of one project. I want to keep the production code separate from the test code, so I am writing tests in another project. Test Project Links to the original project. (IDE C # Express 2010)
My test code is as follows:
using NUnit.Framework;
namespace test.Import
{
[TestFixture]
class XMLOpenTest
{
[Test]
public void openNotAPath(){
try
{
production.Import.XMLHandler.open("Not A Path");
}
catch
{
Assert.Fail("File Open Fail");
}
}
}
}
I know that I can solve this problem by making the production.Import.XMLHandler class public, but I don’t want to change my production code to allow such testing.
? ? ? dummys ?