如何使用 MBUnit 和 C# 创建全局 testfixturesetup 例程?
我在我的测试项目中使用 MBUnit,并且有一个设置例程,必须在几个不同的测试装置正常运行之前运行该例程。
目前,在每个 TestFixture 中,我在执行此操作的例程上都有 [TestFixtureSetup] 属性,但逻辑在每个单独的测试装置中不必要地重复。
使用什么方法来创建将在运行任何 TestFixture 之前运行的 TestFixtureSetup 例程?
I'm using MBUnit for my test project and have a setup routine that must run before several different test fixtures can run properly.
Currently in each TestFixture I've got the [TestFixtureSetup] attribute on a routine that performs this, but the logic is unnecessarily duplicated in each individual test fixture.
What method is used to create a TestFixtureSetup routine that will run before any TestFixture is ran?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 MbUnit v3 中,使用 [AssemblyFixture]。
在 MbUnit v2 中,使用 [AssemblyCleanUp]。
In MbUnit v3, use [AssemblyFixture].
In MbUnit v2, use [AssemblyCleanUp].