1
단계 정의에서 단계를 호출하려고하는데이를 수행 할 때 SpecFlowException
이 표시됩니다. 다음 예에서단계 정의에서 호출하는 Specflow가 TechTalk.SpecFlow.SpecFlowException을 throw합니다. 단계 클래스의 컨테이너가 초기화되지 않았습니다.
봐 :
[Binding]
public class MySteps: Steps
{
[Given("Doing some actions, getting (.*) and (.*)")]
public void DoingSomeActionsGettingValueAndOtherValue(int a, int b)
{
Given($"I pass first integer {a} and second integer {b}");
}
[Given(@"I pass first integer (.*) and second integer (.*)")]
public void ThenIPassFirstIntegerValueAndSecondIntegerValue(int a, int b)
{
AreEqual(a, b);
}
}
예외는 다음
-> error: Container of the steps class has not been initialized!
TechTalk.SpecFlow.SpecFlowException: Container of the steps class has not been initialized!
at TechTalk.SpecFlow.Steps.AssertInitialized()
at TechTalk.SpecFlow.Steps.get_TestRunner()
at TechTalk.SpecFlow.Steps.Given(String step)
나는이 특정 오류가있는 이유 누군가가 설명 할 수이며 어떻게 해결합니까? 나는 문서화에 많은 도움을 찾을 수 없었다.