FitNesse と SLIM を使用していますが、オブジェクトをメソッドに渡したいのですが、方法がわかりません。SLIM を使用してこれを行うにはどうすればよいですか?
たとえば、呼び出しオブジェクトを作成したい
!|FitTesting.MakeCall |
|ANI |Call Type|Call Id|Call Key No| Data|
|4403951403|2 |2000 |8000 |5000 |
そのオブジェクトをシンボル名または変数名で格納したいCallObject
次に、そのオブジェクトを Start Call メソッドで使用します。
|script | FitTesting.PracticeCallTestFixture|
|Initialize Call Fixture|
|Start Call|<<With Call Object>>
|check|Check For Call|true|
|Finalize Phone Desktop|
辞書を使用しようとしましたが、次の例外が発生しました
EXCEPTION_:fitSharp.Machine.Exception.ParseException1[System.String]: Parse parameter 1 for 'UpdateECCData' type System.Collections.Generic.Dictionary
2[System.String,System.String] failed. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at fitSharp.Machine.Model.BranchList1.get_Item(Int32 index)
at fitSharp.Slim.Operators.ParseDictionary.Parse(Type type, TypedValue instance, Tree
1 parameters)
at fitSharp.Machine.Engine.ProcessorBase2.<>c__DisplayClass11.<>c__DisplayClass13.<Parse>b__10(ParseOperator
1 o)
at fitSharp.Machine.Engine.ProcessorBase2.<>c__DisplayClass11.<Parse>b__e(OperationLogging logging)
at fitSharp.Machine.Engine.ProcessorBase
2.DoLoggedOperation[R](String startMessage, Func2 operation)
at fitSharp.Machine.Engine.ParameterList
1.ParseParameterValue(RuntimeMember member, TypedValue instance, Tree1 parameter, Int32 parameterIndex)
--- End of inner exception stack trace ---
at fitSharp.Machine.Engine.ParameterList
1.ParseParameterValue(RuntimeMember member, TypedValue instance, Tree1 parameter, Int32 parameterIndex)
at fitSharp.Machine.Engine.ParameterList
1.<>c_DisplayClass1.b_0(List1 parameterList, Tree
1 parameter)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func
3 func)
at fitSharp.Machine.Engine.ParameterList1.GetParameterList(TypedValue instance, Tree
1 parameters, RuntimeMember member)
at fitSharp.Machine.Engine.InvokeDefault2.Invoke(TypedValue instance, String memberName, Tree
1 parameters)
at fitSharp.Slim.Operators.InvokeLibrary.Invoke(TypedValue instance, String memberName, Tree1 parameters)
at fitSharp.Machine.Engine.ProcessorBase
2.<>c_DisplayClass18.<>c_DisplayClass1a.b_17(InvokeOperator1 o)
at fitSharp.Machine.Engine.ProcessorBase
2.<>c_DisplayClass18.b_15(OperationLogging logging)
at fitSharp.Machine.Engine.ProcessorBase2.DoLoggedOperation[R](String startMessage, Func
2 operation)
at fitSharp.Slim.Operators.InvokeInstructionBase.InvokeMember(Tree1 parameters, Int32 memberIndex)
at fitSharp.Slim.Operators.ExecuteCall.ExecuteOperation(Tree
1 parameters)
at fitSharp.Slim.Operators.InvokeInstructionBase.Invoke(TypedValue instance, String memberName, Tree`1 parameters)
これが適合マークアップです
!|FitTestingConnectCTI.MakeCall |
|ANI |Call Type|Router Call Key Id|Router Call Key Day|Update ECC Data |
|4403951403|2 |2000 |5000 |!{ANI:4403951403,StateAbbr:OH} |
これが私のメソッド呼び出しです
public void UpdateECCData(Dictionary<string,string> eccDictionary)
{
if (eccDictionary != null)
{
if (eccDictionary.Count > 0)
{
foreach (KeyValuePair<string, string> keyValuePair in eccDictionary)
{
ECCData.Add(keyValuePair.Key,keyValuePair.Value);
}
}
}
}