public static void BeforeFeature() { var calcProcess = new CalculatorProcess(); FeatureContext.Current.Process(calcProcess); FeatureContext.Current.ProcessId(calcProcess.ProcessId); }
public void Setup() { calculator = new CalculatorProcess(); calculator.Run(); }
public static void Process(this SpecFlowContext context, CalculatorProcess process) { context.Set(process, "Process"); }
//Windows计算器控制按钮的单击事件代码 private void btnCalculatorStart_Click(object sender, EventArgs e) { CalculatorProcess.Start();//启动一个Windows计算器,就是启动我们刚才那个Process组件 }