When using SpecFlows ScenarioContext to find requests, there should be an easier way to find matching requests based on the current context.
E.g.:
When executed in a scenarios steps, we currently need to deep-dive into the current scenario-context in order to gather the needed information to find a matching request, e.g.:
var request = featureFolder.FindRaw(scenarioContext.StepContext.StepInfo.BindingMatch.StepBinding.Regex, variables);
This should be shortened significantly, preserving the possibility to leverage either a simple stringor a RegExfor finding requests.
When using SpecFlows ScenarioContext to find requests, there should be an easier way to find matching requests based on the current context.
E.g.: When executed in a scenarios steps, we currently need to deep-dive into the current scenario-context in order to gather the needed information to find a matching request, e.g.:
This should be shortened significantly, preserving the possibility to leverage either a simple
string
or aRegEx
for finding requests.Maybe this would be OK to do via special extensions/overloads, which accept a ScenarioContext or so in https://github.com/earloc/postomate/blob/c5e14a81c1c7f9bf557f9bf8ad1aee3ed55a1b32/src/Postomate/Postman/RequestFolder.cs#L46 and https://github.com/earloc/postomate/blob/c5e14a81c1c7f9bf557f9bf8ad1aee3ed55a1b32/src/Postomate/Postman/RequestFolder.cs#L49.
However, this possibly would need to be done in a seperate
Postomate.Extensions.*
-assembly.