2

テーブルの例:

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

コード例:

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
 }
}

例外がスローされます。method name '0' not found in SomeTest...

FitNesse が「0」をパラメーターではなくメソッドと見なしている理由がわかりません。

4

2 に答える 2

0

Slim テストシステムを使用していますか? ColumnFixture には、適合テスト システムが必要です。http://fitnesse.org/FitNesse.UserGuide.TestSystems

Slim テスト システムでは、DecisionTable http://fitnesse.org/FitNesse.UserGuide.SliM.DecisionTableを使用します。

したがって、テストは次のようになります。

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

!|SomeTest|
|Index|CheckUserOrder?|
|0|Name1|
|1|Name2|
于 2013-10-17T15:46:36.873 に答える