MbUnit / Gallio 上的 FixtureSetup 无法运行
我不明白这个问题。 首先,我引用了 MBUnit v2,一切都运行良好。 然后我安装并引用了MBunit v3...这似乎是Gallio安装bin文件夹中的MbUnit.dll和Gallio.dll。 当我编译时,我收到了一些关于 TestFixtureSetup 的警告,所以我将它们更改为 FixtureSetup。 但现在他们不再被处决了。 有什么线索我做错了吗?
顺便说一句,我应该引用哪个 dll? 因为当我使用 MbUnit v2 时,我总是使用 MbUnit.Framework.dll,但情况似乎不再如此了。
我很困惑...
编辑: 我认为这个例子最好地解释了我的问题:
我使用 TestDriven.NET 尝试了这个:
[TestFixture]
public class CategoryTests
{
[FixtureSetUp]
public void _TestFixtureSetup()
{
Debug.WriteLine("in fixturesetup");
}
[Test]
public void test()
{
Debug.WriteLine("in test");
Assert.IsTrue(true);
}
}
右键单击测试方法并选择运行测试后,我得到以下输出:
------ Test started: Assembly: mvcstore.DataAccess.Tests.dll ------
in test
1 passed, 0 failed, 0 skipped, took 1.13 seconds.
I don't understand this problem. First I had MBUnit v2 referenced and everything worked perfectly. Then I installed and referenced MBunit v3... Which seems to be MbUnit.dll and Gallio.dll in the Gallio install bin-folder. And when I compiled I got some warnings on TestFixtureSetup, so I changed those to FixtureSetup. But now they don't get executed anymore. Any clues what I'm doing wrong?
Which dll's should I reference btw? Because when I used v2 of MbUnit I always used MbUnit.Framework.dll but that doesn't seem to be the case anymore.
I'am confused...
Edit:
This example explains my problem best I think:
I tried this using TestDriven.NET:
[TestFixture]
public class CategoryTests
{
[FixtureSetUp]
public void _TestFixtureSetup()
{
Debug.WriteLine("in fixturesetup");
}
[Test]
public void test()
{
Debug.WriteLine("in test");
Assert.IsTrue(true);
}
}
Upon rightclicking on the test method and choosing Run Test(s) I get this output:
------ Test started: Assembly: mvcstore.DataAccess.Tests.dll ------
in test
1 passed, 0 failed, 0 skipped, took 1.13 seconds.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需要以下 2 个程序集:MbUnit.dll 和 Gallio.dll。 请务必使用新的运行程序,因为旧的运行程序 (mbunit v2) 与 mbUnit v3 不兼容。
Icarus 是 GUI 运行器,Echo 是命令行运行器。
You need only the 2 following assemblies: MbUnit.dll and Gallio.dll. Be sure to use the new runner because the old one (mbunit v2) is not compatible with mbUnit v3.
Icarus is the GUI runner and Echo is the command line runner.