如何在 FitNesse 中使用 ArrayFixture?

发布于 2024-07-06 23:39:39 字数 200 浏览 8 评论 0原文

我很难让阵列装置正常工作。

最初,测试被编写为 rowfixture,后来需求发生了变化,现在结果的顺序很重要。

看来您必须将数据传递到基本 arrayfixture 构造函数中,但我不知道这是如何实现的,也不知道如何将参数传递到 arrayfixture 中。

如果有人有健身和固定装置代码的工作示例,我将非常感谢您发布它。

I'm having a hard time getting an array fixture to work.

Origanlly the test was written as a rowfixture, Requirements later changed and now the order of the results matters.

It seems you have to pass the data into the base arrayfixture constructor but I don't see how that is possible or how you pass arguments into the arrayfixture.

If someone has a working example of the fitnesse and fixture code I would really appreciate your posting it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海的爱人是光 2024-07-13 23:39:39

ArrayFixture 最常与 DoFixture 的自动换行功能一起使用。 如果 DoFixture 表中的方法返回列表,则会使用该列表创建 ArrayFixture,并将该列表与 DoFixture 表中的其余行进行比较。

例如,

|mydofixture|
|mylistmethod|something|
|name1|name2|name3|
|value11|value12|value13|
|value21|value22|value23|

请参阅 http://fitsharp.github.io/Fit/FixtureWrapper.html 和 < a href="https://github.com/jediwhale/fitsharp/blob/master/source/fitTest/Double/SampleDomain.cs" rel="nofollow">https://github.com/jediwhale/fitsharp/blob/主/源/fitTest/Double/SampleDomain.cs

ArrayFixture is most commonly used with the auto-wrapping feature of DoFixture. If a method in a DoFixture table returns a list, an ArrayFixture is created with the list and compares the list to the remaining rows in the DoFixture table.

e.g.

|mydofixture|
|mylistmethod|something|
|name1|name2|name3|
|value11|value12|value13|
|value21|value22|value23|

See http://fitsharp.github.io/Fit/FixtureWrapper.html and https://github.com/jediwhale/fitsharp/blob/master/source/fitTest/Double/SampleDomain.cs

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文