提交 eab958fe 编写于 作者: A Andrew Hall (METAL)

Add value changes to integration tests

上级 a66ccb3a
......@@ -54,6 +54,39 @@ class C
");
}
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveToNamespace)]
public void VerifyCancellationWithChange()
{
SetUpEditor(
@"
namespace A
{
class C$$
{
}
}
");
VisualStudio.Editor.InvokeCodeActionList();
VisualStudio.Editor.Verify.CodeAction("Move to namespace...",
applyFix: true,
blockUntilComplete: false);
MoveToNamespaceDialog.VerifyOpen();
MoveToNamespaceDialog.SetNamespace("B");
MoveToNamespaceDialog.ClickCancel();
MoveToNamespaceDialog.VerifyClosed();
VisualStudio.Editor.Verify.TextContains(
@"
namespace A
{
class C
{
}
}
");
}
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveToNamespace)]
public void VerifyOkNoChange()
{
......@@ -85,4 +118,36 @@ class C
}
");
}
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveToNamespace)]
public void VerifyOkWithChange()
{
SetUpEditor(
@"namespace A
{
class C$$
{
}
}
");
VisualStudio.Editor.InvokeCodeActionList();
VisualStudio.Editor.Verify.CodeAction("Move to namespace...",
applyFix: true,
blockUntilComplete: false);
MoveToNamespaceDialog.VerifyOpen();
MoveToNamespaceDialog.SetNamespace("B");
MoveToNamespaceDialog.ClickOK();
MoveToNamespaceDialog.VerifyClosed();
VisualStudio.Editor.Verify.TextContains(
@"namespace B
{
class C
{
}
}
");
}
}
}
......@@ -56,6 +56,11 @@ public bool CloseWindow()
return true;
}
public void SetNamespace(string @namespace)
{
DialogHelpers.SetElementValue(GetMainWindowHWnd(), MoveToNamespaceDialogId, "NamespaceBox", @namespace);
}
/// <summary>
/// Clicks the "OK" button and waits for the Move To Namespace operation to complete.
/// </summary>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册