public async Task TestVSTS567503() { using (var testCase = await Create(@" class Foo { /// <exception cref="""">$ void Bar () { } } ", createWithProject: true)) { var indent = new CSharpTextEditorIndentation(); indent.Initialize(testCase.Document.Editor, testCase.Document); indent.KeyPress(KeyDescriptor.FromGtk((Gdk.Key) '>', '>', Gdk.ModifierType.None)); CheckOutput(testCase, @" class Foo { /// <exception cref="""">$</exception> void Bar () { } } ", indent); } }
public void TestBug17766() { var data = Create(@" class Foo { $void Bar () { } } "); var engine = new CSharpTextEditorIndentation(); var tww = new TestWorkbenchWindow(); var content = new TestViewContent(data); tww.ViewContent = content; content.ContentName = "a.cs"; engine.Initialize(new Document(tww)); MiscActions.RemoveTab(data); engine.KeyPress(Gdk.Key.Tab, '\t', Gdk.ModifierType.ShiftMask); CheckOutput(data, @" class Foo { $void Bar () { } } ", engine); }
public async Task TestIssue5951() { using (var data = await Create(@" using System; namespace MyLibrary { public class MyClass { public MyClass() { } $ } }")) { data.Document.Editor.Options = new CustomEditorOptions(data.Document.Editor.Options) { IndentStyle = IndentStyle.Smart, RemoveTrailingWhitespaces = false }; var indent = new CSharpTextEditorIndentation(); indent.Initialize(data.Document.Editor, data.Document); indent.KeyPress(KeyDescriptor.FromGtk(Gdk.Key.Return, '\n', Gdk.ModifierType.None)); CheckOutput(data, @" using System; namespace MyLibrary { public class MyClass { public MyClass() { } $ } }", indent); } }