Repository: dotnet/roslyn
File: src/Analyzers/CSharp/Tests/RemoveUnusedMembers/RemoveUnusedMembersTests.cs (C#)

Code before:
            }
            """;

        await VerifyCS.VerifyCodeFixAsync(code, code);
    }

    [Fact]
    public async Task DebuggerDisplayAttribute_OnNestedTypeMember_ReferencesField()
    {
        var code = """
            class C
            {
                private static string s;

                class Nested
                {
                    [System.Diagnostics.DebuggerDisplayAttribute("{C.s}")]
                    public int M;
                }
            }
            """;

        await VerifyCS.VerifyCodeFixAsync(code, code);
    }

    [Fact]
    public async Task DebuggerDisplayAttribute_OnType_NameParameter_ReferencesProperty()
    {
        var code = """
            [System.Diagnostics.DebuggerDisplay("{DebuggerValue}", Name = "{DebuggerName}")]
            class C
            {
                private string DebuggerValue => GetType().Name;
                private string DebuggerName => GetType().Name;
            }
            """;

        await VerifyCS.VerifyCodeFixAsync(code, code);
    }

    [Fact]
    public async Task DebuggerDisplayAttribute_OnType_TypeParameter_ReferencesMethod()
    {
        var code = """
            [System.Diagnostics.DebuggerDisplay("{DebuggerValue}", Type = "{DebuggerType()}")]
            class C
            {
                private string DebuggerValue => GetType().Name;
                private string DebuggerType() => GetType().Name;
            }
            """;

Review comment (suggestion):
@copilot update theese to `[Fact, WorkItem("")]` with the appropriate url for all tests you've added.

Code after:
            }
            """;

        await VerifyCS.VerifyCodeFixAsync(code, code);
    }

    [Fact]
    public async Task DebuggerDisplayAttribute_OnNestedTypeMember_ReferencesField()
    {
        var code = """
            class C
            {
                private static string s;

                class Nested
                {
                    [System.Diagnostics.DebuggerDisplayAttribute("{C.s}")]
                    public int M;
                }
            }
            """;

        await VerifyCS.VerifyCodeFixAsync(code, code);
    }

    [Fact, WorkItem("https://github.com/dotnet/roslyn/issues/71523")]
    public async Task DebuggerDisplayAttribute_OnType_NameParameter_ReferencesProperty()
    {
        var code = """
            [System.Diagnostics.DebuggerDisplay("{DebuggerValue}", Name = "{DebuggerName}")]
            class C
            {
                private string DebuggerValue => GetType().Name;
                private string DebuggerName => GetType().Name;
            }
            """;

        await VerifyCS.VerifyCodeFixAsync(code, code);
    }

    [Fact, WorkItem("https://github.com/dotnet/roslyn/issues/71523")]
    public async Task DebuggerDisplayAttribute_OnType_TypeParameter_ReferencesMethod()
    {
        var code = """
            [System.Diagnostics.DebuggerDisplay("{DebuggerValue}", Type = "{DebuggerType()}")]
            class C
            {
                private string DebuggerValue => GetType().Name;
                private string DebuggerType() => GetType().Name;
            }
            """;