0

如何运行测试来测试我的 nemerle 代码。例如,我在一个 nemerle 项目中有一个 Calculator 类和一个 CalculatorTests 类。我已经使用包管理器(“install-package nunit”)添加了对 nunit 的引用。现在 NUnit 在 nemerle 项目中可用。

编写以下代码后

  [TestFixture]
  class CalculatorTests
  {
        [Test]
        MyTest() : void
        {
            def result = Calculator().Add( 1 );
            Assert.AreEqual( 2, result );
        }
  }

我尝试使用 TestDriven.net Visual Studio 插件来运行测试,但无法运行。有人可以告诉我如何在 nemerle 中运行测试,还是在执行控制台应用程序时我必须编写代码来运行所有测试?

4

1 回答 1

0

Maybe it caused by NUnit runs under .Net 2.0 runtime. Try to set a runtime version in the NUnit command line.

于 2014-06-17T19:49:11.747 回答