-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable nullable on ObjectModel #3793
Enable nullable on ObjectModel #3793
Conversation
82f4eb6
to
57d13e9
Compare
@@ -22,15 +20,15 @@ public interface ITestExecutor | |||
/// <param name="tests">Tests to be run.</param> | |||
/// <param name="runContext">Context to use when executing the tests.</param> | |||
/// <param param name="frameworkHandle">Handle to the framework to record results and to do framework operations.</param> | |||
void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle); | |||
void RunTests(IEnumerable<TestCase>? tests, IRunContext? runContext, IFrameworkHandle? frameworkHandle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Evangelink I just updated to v17.3.0 of Microsoft.TestPlatform.ObjectModel and got nullable errors due to the annotations on these two RunTests
methods.
Are they actually correct? I've looked at implementations both in this repo and the wild and no one seems to expect any of these parameters to ever be null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @alexrp, thanks for raising this. I am just coming back from vacation and I will look into it this week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at mstest, xunit and nunit, it seems that tests
cannot be null
but runContext
can.
Contributes to AB#1549371