Lin*_*ela 5 c# testing bdd specifications specflow
我有一个奇怪的例子,执行顺序混乱
我为所有步骤定义创建了一个基类
public abstract class BaseSteps
{
static BaseSteps()
{
Console.WriteLine("static Constructor");
}
protected BaseSteps()
{
Console.WriteLine("public Constructor");
}
[BeforeTestRun]
public static void BeforeTestRun()
{
Console.WriteLine("static void BeforeTestRun");
}
[AfterTestRun]
public static void AfterTestRun()
{
Console.WriteLine("static void AfterTestRun");
}
[Before]
public static void Before()
{
Console.WriteLine("Base Before Scenario");
}
}
[Binding]
public class SpecFlowFeature1Steps: BaseSteps
{
public SpecFlowFeature1Steps()
{
}
[BeforeScenario()]
public void Setup()
{
}
Run Code Online (Sandbox Code Playgroud)
但奇怪的是,我的调试模式下的执行顺序看起来像这样
我原以为它会像...
...
知道为什么会这样吗?
TIA
归档时间: |
|
查看次数: |
2952 次 |
最近记录: |