Closed gasparnagy closed 1 year ago
@SabotageAndi the PR exposes a tuple on the IBindingRegistry
interface (IEnumerable<(BindingErrorType ErrorType, string Message)> GetErrorMessages();
) I don't know if this is a good practice, or whether we should create a new type for that. What do you think?
I would not put a tuple into a public interface. Feels wrong for me.
@SabotageAndi OK, I agree. I will fix it
@SabotageAndi pushed a new version without the tuple
@gasparnagy Ready to merge?
@SabotageAndi yes, done.
Some generic binding errors (e.g.
[Binding]
on a generic type) were not properly reported as errors so far, only as warnings, but those are usually not visible by test runners. Some of these errors were causing strange exceptions during execution, but it was hard to trace them back to the source problem.Also type load exceptions blocked the discovery process that causes problems with tooling (e.g. VS) that uses the binding registry builder to discover the step definitions.
This PR introduces validity of loaded binding registry and provides a way to query these errors from the binding registry. During test execution, the invalid binding registry fails the tests by listing all collected error.
Types of changes
Checklist: