Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 379
Bob Dizzle Avatar asked Dec 13 '25 06:12

Bob Dizzle


1 Answers

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

like image 184
Mike Stockdale Avatar answered Dec 14 '25 19:12

Mike Stockdale



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!