我在我的代码中使用行Assert.IsNotNull(object);
。我不断收到错误:断言方法错误
the name assert does not exist in the current content
有人能告诉我我失踪了什么吗?
我在我的代码中使用行Assert.IsNotNull(object);
。我不断收到错误:断言方法错误
the name assert does not exist in the current content
有人能告诉我我失踪了什么吗?
是听起来像你没有一个合适的using
指令,如
using NUnit.Framework;
在你的代码
。当然,确切的指令将取决于您使用的单元测试框架。我希望你虽然得到其他的东西同样的问题 - 尤其是[Test]
属性等
(如果我的回答并不能帮助你,请提供更多信息。) – 2012-01-01 21:18:23