vstest-docs icon indicating copy to clipboard operation
vstest-docs copied to clipboard

Filtering example is wrong

Open benmcmorran opened this issue 6 years ago • 0 comments

The example test case filtering code does not compile. Specifically here:

var filterExpression = runContext.GetTestCaseFilter(supportedProperties, (propertyName) =>
{
    TestProperty testProperty = null;
    supportedProperties.TryGetValue(propertyName, out testProperty);
    return testProperty;
});

GetTestCaseFilter() has this signature:

ITestCaseFilterExpression GetTestCaseFilter(IEnumerable<String> supportedProperties, Func<string, TestProperty> propertyProvider);

but supportedProperties in the example is a Dictionary<string, TestProperty>

benmcmorran avatar May 11 '18 22:05 benmcmorran