-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VSI test for Edit.RemoveAndSort (#18503)
- Loading branch information
Ravi Chande
authored
Apr 6, 2017
1 parent
82110f4
commit 232d6f0
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpOrganizing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.CodeAnalysis; | ||
using Microsoft.VisualStudio.IntegrationTest.Utilities; | ||
using Roslyn.Test.Utilities; | ||
using Xunit; | ||
|
||
namespace Roslyn.VisualStudio.IntegrationTests.CSharp | ||
{ | ||
[Collection(nameof(SharedIntegrationHostFixture))] | ||
public class CSharpOrganizing : AbstractEditorTest | ||
{ | ||
protected override string LanguageName => LanguageNames.CSharp; | ||
|
||
public CSharpOrganizing(VisualStudioInstanceFactory instanceFactory) | ||
: base(instanceFactory, nameof(CSharpOrganizing)) | ||
{ | ||
} | ||
|
||
[Fact, Trait(Traits.Feature, Traits.Features.Organizing)] | ||
public void RemoveAndSort() | ||
{ | ||
SetUpEditor(@"$$ | ||
using C; | ||
using B; | ||
using A; | ||
class Test | ||
{ | ||
CA a = null; | ||
CC c = null; | ||
} | ||
namespace A { public class CA { } } | ||
namespace B { public class CB { } } | ||
namespace C { public class CC { } }"); | ||
VisualStudio.ExecuteCommand("Edit.RemoveAndSort"); | ||
VisualStudio.Editor.Verify.TextContains(@" | ||
using A; | ||
using C; | ||
class Test | ||
{ | ||
CA a = null; | ||
CC c = null; | ||
} | ||
namespace A { public class CA { } } | ||
namespace B { public class CB { } } | ||
namespace C { public class CC { } }"); | ||
|
||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/VisualStudio/IntegrationTest/IntegrationTests/VisualBasic/BasicOrganizing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.CodeAnalysis; | ||
using Microsoft.VisualStudio.IntegrationTest.Utilities; | ||
using Roslyn.Test.Utilities; | ||
using Xunit; | ||
|
||
namespace Roslyn.VisualStudio.IntegrationTests.Basic | ||
{ | ||
[Collection(nameof(SharedIntegrationHostFixture))] | ||
public class BasicOrganizing : AbstractEditorTest | ||
{ | ||
protected override string LanguageName => LanguageNames.VisualBasic; | ||
|
||
public BasicOrganizing(VisualStudioInstanceFactory instanceFactory) | ||
: base(instanceFactory, nameof(BasicOrganizing)) | ||
{ | ||
} | ||
|
||
[Fact, Trait(Traits.Feature, Traits.Features.Organizing)] | ||
public void RemoveAndSort() | ||
{ | ||
SetUpEditor(@"Imports System.Linq$$ | ||
Imports System | ||
Imports System.Runtime.InteropServices | ||
Imports System.Runtime.CompilerServices | ||
Class Test | ||
Sub Method(<CallerMemberName> Optional str As String = Nothing) | ||
Dim data As COMException | ||
End Sub | ||
End Class"); | ||
VisualStudio.ExecuteCommand("Edit.RemoveAndSort"); | ||
VisualStudio.Editor.Verify.TextContains(@"Imports System.Runtime.CompilerServices | ||
Imports System.Runtime.InteropServices | ||
Class Test | ||
Sub Method(<CallerMemberName> Optional str As String = Nothing) | ||
Dim data As COMException | ||
End Sub | ||
End Class"); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters