Skip to content

Overloads cause test method name collision through duplicates #5

@chuck-flowers

Description

@chuck-flowers

Currently if there is a method with overloads multiple test methods with the same name are generated which causes the compilation of the test methods to fail.

Example:
Source Code

public class Foo
{
    public void Bar()
    {
        //Does stuff that needs testing
    }

    public void Bar(int i)
    {
        //Does stuff that needs testing
    }
}

Generated Test Code

public class FooTests
{
    [Fact]
    public void BarTest()
    {
        //Test code goes here
    }

    [Fact]
    //This is a duplicate definition!!! Won't compile
    public void BarTest()
    {
        //Test code goes here
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions