You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The iteration of the "IEnumerable< ITestResult > Children" member in TestResult.cs on line 407 is unnecessarily casting the ITestResult to TestResult, making it hard/impossible to keep extended children in the list.
Could the enumeration be fixed to iterate on the ITestResult interface, without the unnecessary casting? There are other places in the code base where similar unnecessary casts take place, but this one place is a real pain for me.
Thanks.
The text was updated successfully, but these errors were encountered:
IIRC, we did a pass to fix this at one time, but probably only caught explicit casts, not the implied cast you point out. At some point, I believe we decided to require all results to derive from the TestResult abstract class, but I don't think we have been consistent about it. IMO we should either lose the interface and require the class or remove all these casts, which are confusing at best.
As for this change, we would probably want to search for uses of non-interface methods of TestResult and ensure we are not breaking anything.
Thanks, that would be great. I derived my own classes from the interface directly, which is why I ran into this problem. The abstract class on the other hand has several methods marked as non-virtual so I can't extend from it properly either.
Hi.
The iteration of the "IEnumerable< ITestResult > Children" member in TestResult.cs on line 407 is unnecessarily casting the ITestResult to TestResult, making it hard/impossible to keep extended children in the list.
Could the enumeration be fixed to iterate on the ITestResult interface, without the unnecessary casting? There are other places in the code base where similar unnecessary casts take place, but this one place is a real pain for me.
Thanks.
The text was updated successfully, but these errors were encountered: