简体   繁体   中英

How do I use an ArrayFixture in FitNesse?

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.

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.

eg

|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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM