-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
exception in errorlist #10
Comments
this following line throw https://github.com/fluentassertions/fluentassertions.analyzers/blob/master/src/FluentAssertions.Analyzers/Utilities/FluentAssertionsWithArgumentsCSharpSyntaxVisitor.cs#L31 maybe you are chaining multiple methods with the same name and both of the method calls have arguments? |
Heureka! public class MyClass
{
public string Message { get; }
}
class Class1
{
[TestMethod]
public void MyTestMethod()
{
var details = new List<MyClass>();
details.Should().Contain(d => d.Message.Contains("a"))
.And.Contain(d => d.Message.Contains("c"));
}
} |
I had a feeling it's something like this... Looks like another redesign to the I'm going to add a SanityTests class (not sure about the name yet) that will include cases the should not throw exceptions (and no diagnostics), this will help |
Be careful with flattening the syntax tree in any way.
is currently simplified into: nestedList.Should().NotBeNullOrEmpty()
.And.ContainSingle()
.Which.Should(); |
looks like the |
As of Fluent Assertions 5.0, I guess you should be able to do so. Most assertions return an E.g. |
I get several exceptions in the error list:
The stack traces seems to be identical for all of them, see below for one of them.
A lot of the analyzers mentioned in the stack traces don't seem to apply for my test method?
I haven't been able to come up with an example that triggers the bug.
Any ideas?
The text was updated successfully, but these errors were encountered: