-
-
Notifications
You must be signed in to change notification settings - Fork 836
Closed
Description
If I install xunit.analyzers 0.5.0 and write:
public class X
{
[Fact]
public void Test()
{
Test(42, 42);
}
private void Test(int x, int y)
{
Assert.Equal(x, y);
}
}
xUnit1024 ('test method has same name as another method') is fired on the method, despite that the second method isn't a test. If I disable analyzers, build this library, and run it under the console runner, I do see the test is ran:
xUnit.net Console Runner (64-bit .NET 4.0.30319.42000)
Discovering: TestXunit
Discovered: TestXunit
Starting: TestXunit
Finished: TestXunit
=== TEST EXECUTION SUMMARY ===
TestXunit Total: 1, Errors: 0, Failed: 0, Skipped: 0, Time: 0.138s
It seems here the analyzer is being overly aggressive and I suspect shouldn't be flagging in this case.
Happy to contribute the fix if somebody who knows how this Should Work™ can confirm my gut.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels