Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在使用 MSpec练习Check Out Kata时,我想删除规范中的重复项,就像在 NUnit 中添加 RowTest 一样,但我不知道如何。
有没有人尝试过类似的方法,或者您是否会认为这种方法在 MSpec 等上下文/观察框架中是一种反模式?
MSpec 不支持RowTestNUnit 和 MbUnit 等其他框架中已知的概念。
RowTest
对具有行为的重用规范(Its)的支持有限,即,Behaves_like<TBehavior>但这与RowTest.
It
Behaves_like<TBehavior>
我通常不鼓励强制 MSpec 处理大量不同的数据点,因为您需要使用代码 kata。有更好的工具来处理这种情况,比如你提到的那个(NUnit)。