本文整理汇总了C#中Microsoft.CodeAnalysis.Editor.UnitTests.RenameTracking.RenameTrackingTestState.AssertNoTag方法的典型用法代码示例。如果您正苦于以下问题:C# RenameTrackingTestState.AssertNoTag方法的具体用法?C# RenameTrackingTestState.AssertNoTag怎么用?C# RenameTrackingTestState.AssertNoTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.CodeAnalysis.Editor.UnitTests.RenameTracking.RenameTrackingTestState
的用法示例。
在下文中一共展示了RenameTrackingTestState.AssertNoTag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenameTrackingNotInBlankFile
public async Task RenameTrackingNotInBlankFile()
{
var code = @"$$";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("d");
await state.AssertNoTag().ConfigureAwait(true);
}
}
示例2: RenameTrackingNotInBlankFile
public void RenameTrackingNotInBlankFile()
{
var code = @"$$";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("d");
state.AssertNoTag();
}
}
示例3: RenameTrackingNotOnCreation
public async Task RenameTrackingNotOnCreation()
{
var code = @"
class C$$
{
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
await state.AssertNoTag().ConfigureAwait(true);
}
}
示例4: RenameTrackingNotOnCreation
public void RenameTrackingNotOnCreation()
{
var code = @"
class C$$
{
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.AssertNoTag();
}
}
示例5: RenameTrackingInvokeAndChangeBackToOriginal
public void RenameTrackingInvokeAndChangeBackToOriginal()
{
var code = @"
class Cat$$
{
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("s");
state.AssertTag("Cat", "Cats", invokeAction: true);
state.AssertNoTag();
state.EditorOperations.Backspace();
state.AssertTag("Cats", "Cat");
}
}
示例6: RenameTrackingNotThroughEmptyStringResumeOnDifferentSpace
public void RenameTrackingNotThroughEmptyStringResumeOnDifferentSpace()
{
var code = @"
class C$$
{
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.Backspace();
// Move to previous space
state.MoveCaret(-1);
state.EditorOperations.InsertText("D");
state.AssertNoTag();
}
}
示例7: RenameTracking_NoTagWhenFirstEditChangesReferenceToAnotherSymbol
public void RenameTracking_NoTagWhenFirstEditChangesReferenceToAnotherSymbol()
{
var code = @"
class C
{
void M()
{
int abc = 7;
int ab = 8;
int z = abc$$;
}
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.Backspace();
state.AssertNoTag();
}
}
示例8: RenameTracking_Nameof_FromMethodGroupReference
public void RenameTracking_Nameof_FromMethodGroupReference()
{
var code = @"
class C
{
void M()
{
nameof(M$$).ToString();
}
void M(int x)
{
}
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("at");
state.AssertTag("M", "Mat", invokeAction: true);
// Make sure the rename completed
var expectedCode = @"
class C
{
void Mat()
{
nameof(Mat).ToString();
}
void Mat(int x)
{
}
}";
Assert.Equal(expectedCode, state.HostDocument.TextBuffer.CurrentSnapshot.GetText());
state.AssertNoTag();
}
}
示例9: RenameTrackingNotWhenStartedFromTextualWordInTrivia
public void RenameTrackingNotWhenStartedFromTextualWordInTrivia()
{
var code = @"
Module Program
Sub Main()
Dim [x$$ = 1
End Sub
End Module";
using (var state = new RenameTrackingTestState(code, LanguageNames.VisualBasic))
{
state.EditorOperations.InsertText("]");
state.AssertNoTag();
}
}
示例10: RenameTrackingNotifiesThirdPartiesOfRenameOperation
public void RenameTrackingNotifiesThirdPartiesOfRenameOperation()
{
var code = @"
class Cat$$
{
public Cat()
{
}
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("s");
state.AssertTag("Cat", "Cats", invokeAction: true);
Assert.Equal(1, state.RefactorNotifyService.OnBeforeSymbolRenamedCount);
Assert.Equal(1, state.RefactorNotifyService.OnAfterSymbolRenamedCount);
var expectedCode = @"
class Cats
{
public Cats()
{
}
}";
Assert.Equal(expectedCode, state.HostDocument.TextBuffer.CurrentSnapshot.GetText());
state.AssertNoNotificationMessage();
state.AssertNoTag();
}
}
示例11: RenameTrackingRedoAlwaysClearsState
public void RenameTrackingRedoAlwaysClearsState()
{
var code = @"
class Cat$$
{
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("s");
state.AssertTag("Cat", "Cats", invokeAction: true);
state.AssertNoTag();
// Resume rename tracking session
state.Undo(2);
state.AssertTag("Cat", "Cats");
state.Redo();
state.AssertNoTag();
state.Redo();
state.AssertNoTag();
}
}
示例12: RenameTrackingNotOnSquareBracketsInCSharp
public void RenameTrackingNotOnSquareBracketsInCSharp()
{
var code = @"
class $$C
{
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("[");
state.AssertNoTag();
state.MoveCaret(1);
state.EditorOperations.InsertText("]");
state.AssertNoTag();
}
}
示例13: RenameTrackingHandlesSquareBracketsAsVisualBasicEscape
public void RenameTrackingHandlesSquareBracketsAsVisualBasicEscape()
{
var code = @"
Class $$C
End Class";
using (var state = new RenameTrackingTestState(code, LanguageNames.VisualBasic))
{
state.EditorOperations.InsertText("[");
state.AssertNoTag();
state.MoveCaret(1);
state.EditorOperations.InsertText("]");
state.AssertTag("C", "[C]");
}
}
示例14: RenameTrackingNotInString
public void RenameTrackingNotInString()
{
var code = @"
class C
{
void Foo()
{
string s = ""abc$$""
}
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("d");
state.AssertNoTag();
}
}
示例15: RenameTrackingNotAtMethodArgument
public void RenameTrackingNotAtMethodArgument()
{
var code = @"
class ABCD
{
void Foo(int x)
{
int abc = 3;
Foo($$
}
}";
using (var state = new RenameTrackingTestState(code, LanguageNames.CSharp))
{
state.EditorOperations.InsertText("a");
state.AssertNoTag();
state.EditorOperations.InsertText("b");
state.AssertNoTag();
}
}