Analyzer: DynamicData should be valid
Summary
Title: DynamicData should be valid
Category: Usage
Description:
Please refer to MSTEST0003: Test methods should have valid layout.
Non exhaustive list of constraints:
- public (except if discover internals)
- static
- member should match kind declared on the attribute (property or method)
- member should exist
- member return type should be valid (
IEnumerable<object[]>orIEnumerable<(Value)Tuple<...>>) - if member is property it should be gettable
- if member is method, it should not have parameters
Would be perfect if this could compare the count and type of parameters when IEnumerable<Tuple> is used.
Thanks! I definitely missed these cases here but I described them in the global analyzers ticket.
@engyebrahim As discussed, postponing to milestone 3.4
I also have a issue with DynamicData in vscode test explorer. same cause here?
@Evangelink
Moved the above issue to a separate one. This is a work item to create the analyzer, not an issue report.