-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Suggestions to use fluent assertions instead of MSTest Asserts do not work if "using Microsoft.VisualStudio.TestTools.UnitTesting;" is located inside of the namespace. #152
Comments
@robertMSFTE version |
Awesome :) |
@Meir017 I've tried version 0.17.0 and it seems in that version I am not getting suggestions in either case. Also seems like something is wrong with the package metadata FluentAssertions.Analyzers. Let me know if you want for me to create a new issue. |
@robertMSFTE just published version |
@Meir017 After updating to 0.17.1 the package information issue seems to be fixed. But sadly, the issue from the original post still reproduces (aka. if the using is inside of the namespace then we don't get the suggestion). |
@robertMSFTE my bad, My fix only worked when the namespace is part of the unit testing library's namespace namespace Microsoft
{
using VisualStudio.TestTools.UnitTesting;
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Assert.AreEqual(1, 1);
}
}
} fix coming up |
@robertMSFTE should be working now with version |
@Meir017 Just tested. Seems like my example works right now :) |
Description
Newly added functionality enabling easy move from MSTest Asserts to fluent assertions does not work if "using Microsoft.VisualStudio.TestTools.UnitTesting;" is located inside of the namespace.
Complete minimal example reproducing the issue
This will get a suggestion:
But this will not:
Expected behavior:
Suggestion to use fluent assertions instead of Assert is shown when "using Microsoft.VisualStudio.TestTools.UnitTesting;" is located inside of the namespace.
Actual behavior:
Suggestion to use fluent assertions instead of Assert is not shown when "using Microsoft.VisualStudio.TestTools.UnitTesting;" is located inside of the namespace.
Versions
The text was updated successfully, but these errors were encountered: