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
CS1503 Argument 1: cannot convert from 'int?' to 'int'
The proper fix should be
[TestMethod]publicvoidTestMethod1(){int?count=3;Assert.IsTrue(count.HasValue);// or Assert.IsNotNull(count)Assert.HasCount(count.Value,newList<string>());}
Describe the bug
The fixer for MSTEST0037 is not handling nullable args correctly.
Steps To Reproduce
Applying the fixer yields:
but this yields
The proper fix should be