c# - XUnit 中的自定义 BeforeTestStarting
问题描述
我可以实现我的自定义版本,Xunit.Sdk.BeforeTestStarting
然后以某种方式注册它吗?我想为从ClassData
. 我无法通过,BeforeAfterTestAttribute
因为我无权访问属性中的测试用例数据。但正如我所见,我可以BeforeTestStarting
通过ITest
.
解决方案
这个 xunit 示例https://github.com/xunit/samples.xunit/tree/master/AssemblyFixtureExample/XunitExtensions展示了这个逻辑是如何工作的
推荐阅读
- html - 重复的字母“S”仅在 ios 设备上
- css - CSS 列和文本换行 - 是否可以设置单独的列宽?
- javascript - 如何确保在执行谷歌应用程序脚本中的下一行之前完成 google.script.run 函数
- nginx - NGINX if else 允许和拒绝基于 IP 地址的请求
- java - Spring Integration 文件仅从 SFTP 跨多个会话一次
- java - 局部变量 edge2 可能尚未初始化
- r - 无法从 R google colab 连接到谷歌驱动器
- batch-file - 批处理完成后保持 Octave 打开
- java - 是否可以在 java if 语句中使用字符串
- urlencode - GNU mailutils:如何在邮箱模式中编码'@'和'$'