NUnit:跨多个夹具的测试夹具中的每个测试的设置和拆卸
我想要一个通用的 SetUp 和 TearDown,它可以在多个固定装置上的每个测试中运行,但都在一个公共命名空间内。这与 [SetUpFixture] 属性类似,但会在每次测试时运行。
我尝试过使用带有 [SetUp] 的基类,但 resharper 将此解决为不确定,这并不是很理想。
I would like to have a generic SetUp and TearDown that is run with every test across multiple fixtures but all within a common namespace. This would be something similar to the [SetUpFixture] attribute but would be run with every test.
I've tried using a base class with [SetUp] but resharper resolves this as inconclusive which isn't really ideal.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有发现将基类与通用代码一起使用有任何问题。
I don't see any problem in using a base class with the generic code.