/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Features/CSharpTest/ImplementInterface/ImplementInterfaceCodeRefactoringTests.cs
61 строка
2 KB
Cyrus Najmabadi
Add test
15 июл 2025, 00:29
15 июл 2025, 00:29
2348ef1
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Threading.Tasks; using Microsoft.CodeAnalysis.Editor.UnitTests.CodeActions; using Microsoft.CodeAnalysis.ImplementInterface; using Microsoft.CodeAnalysis.Test.Utilities; using Roslyn.Test.Utilities; using Xunit; namespace Microsoft.CodeAnalysis.CSharp.UnitTests.ImplementInterface; using VerifyCS = CSharpCodeRefactoringVerifier< ImplementInterfaceCodeRefactoringProvider>; [UseExportProvider] [Trait(Traits.Feature, Traits.Features.CodeActionsImplementInterface)] public sealed class ImplementInterfaceCodeRefactoringTests { [Fact, WorkItem("https://github.com/dotnet/roslyn/issues/78294")] public Task TestInBody() => VerifyCS.VerifyRefactoringAsync(""" interface IGoo { void Goo(); } class C : {|CS0535:IGoo|} { $$ } """, """ interface IGoo { void Goo(); } class C : IGoo { public void Goo() { throw new System.NotImplementedException(); } } """); [Fact, WorkItem("https://github.com/dotnet/roslyn/issues/78294")] public Task TestNotOnInterfaceInBody() => VerifyCS.VerifyRefactoringAsync(""" interface IGoo { void Goo(); } interface IBar : IGoo { $$ } """); }