【发布时间】:2017-11-08 08:33:09
【问题描述】:
public class BaseSteps : Steps
{
[BeforeFeature]
public static void BeforeFeatureStep()
{
var otherStep = new OtherStep();
otherStep.ExecuteStep();
}
}
public class OtherStep : Steps
{
public void ExecuteStep()
{
var key = 'key';
var val = 'val';
this.FeatureContext.Add(key, val);
}
}
这是一个示例 sn-p。当我尝试访问 this.FeatureContext.Add() 时,我收到一个异常声明 Container of the steps class has not been initialized
对此的任何帮助表示赞赏。
【问题讨论】: