2

Table example:

!script|SomeTest           |
|Goto  |$Url               |
|check |IsAt|IndexPage|true|
|Index |CheckUserOrder?    |
|0     |Name1              |
|1     |Name2              |

Code example:

public class SomeTest {
 public string index;
 public bool IsAt(string pageTitle){
    //function for checking title of page
 }
 public string CheckUserOrder{
     return username(index); // will get name of user for list which is other class
 }
}

An exception is thrown: method name '0' not found in SomeTest...

I don't know why FitNesse is considering '0' as a method and not a parameter.

n-verbitsky
  • 552
  • 2
  • 9
  • 20
Aman
  • 224
  • 2
  • 4
  • 14

2 Answers2

0

Are you working with the Slim test system? ColumnFixture requires the Fit test system. http://fitnesse.org/FitNesse.UserGuide.TestSystems

With Slim test system, use the DecisionTable http://fitnesse.org/FitNesse.UserGuide.SliM.DecisionTable

So your test will look like:

!|script|SomeTest|
|Goto|$Url|
|check|IsAt|IndexPage|true|

!|SomeTest|
|Index|CheckUserOrder?|
|0|Name1|
|1|Name2|
Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33
0

You are trying to combine a script and a decission table. If you are doing a script table, I expect you would have:

!|script|SomeTest|
|Goto|$Url|
|check|IsAt|IndexPage|true|
|check|CheckUserOrder|0|Name1|
|check|CheckUserOrder|1|Name2|
Fried Hoeben
  • 3,247
  • 16
  • 14