在XUnit中自定义BeforeTestStarting

问题描述 投票:0回答:1

我可以实现我的自定义版本的Xunit.Sdk.BeforeTestStarting,然后以某种方式进行注册吗?我想为从ClassData返回的测试用例做一些准备步骤。我无法通过BeforeAfterTestAttribute执行此操作,因为我无权访问该属性中的测试用例数据。但正如我所看到的,我在BeforeTestStartingITest中具有此访问权限。

c# xunit xunit.net
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.