获取编译器错误CS0122 - 由于其保护级别,"成员"无法访问 - 同时尝试访问其他项目中的类

Joh*_*nes 3 c# nunit compiler-errors

我试图掌握NUnit - 我已经安装它并在一个项目中成功运行它.我想保持生产代码与testcode分开,所以我在不同的项目中编写测试.测试项目链接到原始项目.(IDE C#Express 2010)

我的Testcode看起来像这样:

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");
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我知道我可以通过将production.Import.XMLHandler类公开来解决这个问题,但我不想更改我的生产代码以允许这种测试.

我该如何解决这个问题?我可以更改我的测试代码吗?是否有其他好方法可以在两个项目中分离测试和生产代码?互联网上有dummys的资源吗?