techtalk/SpecFlow — Issue #163: missing featureInfo.GenerationTargetLanguage
Author: rettigcd
Created: 2012-02-06 16:50:36+00:00
State: open

In TestExecutionEngine.cs on lines 112-114. inside OnFeatureStart(FeatureInfo featureInfo)

If the the condition on line 112 is true, thereby executing the code on line 113, then the code on line 114 will either overwrite the results from 113 or throw an exception. Line 114 should be in an else block.

if (!stepDefinitionSkeletonProviders.ContainsKey(featureInfo.GenerationTargetLanguage))
currentStepDefinitionSkeletonProvider = stepDefinitionSkeletonProviders[ProgrammingLanguage.CSharp]; // fallback case for unsupported skeleton provider
currentStepDefinitionSkeletonProvider = stepDefinitionSkeletonProviders[featureInfo.GenerationTargetLanguage];