diff --git a/DPackRx.Tests/DPackRx.Tests.csproj b/DPackRx.Tests/DPackRx.Tests.csproj
index 724e08c..a3d2c28 100644
--- a/DPackRx.Tests/DPackRx.Tests.csproj
+++ b/DPackRx.Tests/DPackRx.Tests.csproj
@@ -178,6 +178,7 @@
+
diff --git a/DPackRx.Tests/Features/CodeBrowserFeatureTests.cs b/DPackRx.Tests/Features/CodeBrowserFeatureTests.cs
index 850970b..e8fb59a 100644
--- a/DPackRx.Tests/Features/CodeBrowserFeatureTests.cs
+++ b/DPackRx.Tests/Features/CodeBrowserFeatureTests.cs
@@ -161,6 +161,16 @@ public void Execute(int commandId, CodeModelFilterFlags filter)
_messageServiceMock.Verify(m => m.ShowError(It.IsNotNull(), false), Times.Never);
}
+ [Test]
+ public void Execute_InvalidCommand()
+ {
+ var feature = GetFeature();
+
+ var result = feature.Execute(0);
+
+ Assert.That(result, Is.False);
+ }
+
[Test]
public void Execute_NoActiveFile()
{
diff --git a/DPackRx.Tests/Features/FileBrowserFeatureTests.cs b/DPackRx.Tests/Features/FileBrowserFeatureTests.cs
index 93f45af..a2f34f8 100644
--- a/DPackRx.Tests/Features/FileBrowserFeatureTests.cs
+++ b/DPackRx.Tests/Features/FileBrowserFeatureTests.cs
@@ -138,6 +138,16 @@ public void Execute()
_modalDialogServiceMock.Verify(d => d.ShowDialog(It.IsNotNull()));
}
+ [Test]
+ public void Execute_InvalidCommand()
+ {
+ var feature = GetFeature();
+
+ var result = feature.Execute(0);
+
+ Assert.That(result, Is.False);
+ }
+
#endregion
}
}
\ No newline at end of file
diff --git a/DPackRx.Tests/Features/MiscellaneousFeatureTests.cs b/DPackRx.Tests/Features/MiscellaneousFeatureTests.cs
index f39068c..27907cc 100644
--- a/DPackRx.Tests/Features/MiscellaneousFeatureTests.cs
+++ b/DPackRx.Tests/Features/MiscellaneousFeatureTests.cs
@@ -308,6 +308,16 @@ public void Execute_CopyProjectFullPath(string path)
_shellHelperServiceMock.Verify(s => s.GetCurrentProjectPath());
}
+ [Test]
+ public void Execute_InvalidCommand()
+ {
+ var feature = GetFeature();
+
+ var result = feature.Execute(0);
+
+ Assert.That(result, Is.False);
+ }
+
#endregion
}
}
\ No newline at end of file
diff --git a/DPackRx.Tests/Features/SurroundWithFeatureTests.cs b/DPackRx.Tests/Features/SurroundWithFeatureTests.cs
new file mode 100644
index 0000000..9a7ea77
--- /dev/null
+++ b/DPackRx.Tests/Features/SurroundWithFeatureTests.cs
@@ -0,0 +1,197 @@
+using System;
+using System.Windows.Input;
+
+using Moq;
+using NUnit.Framework;
+
+using DPackRx.CodeModel;
+using DPackRx.Features;
+using DPackRx.Features.SurroundWith;
+using DPackRx.Language;
+using DPackRx.Options;
+using DPackRx.Package;
+using DPackRx.Services;
+
+namespace DPackRx.Tests.Features
+{
+ ///
+ /// SurroundWithFeature tests.
+ ///
+ [TestFixture]
+ public class SurroundWithFeatureTests
+ {
+ #region Fields
+
+ private Mock _serviceProviderMock;
+ private Mock _logMock;
+ private Mock _optionsServiceMock;
+ private Mock _shellHelperServiceMock;
+ private Mock _shellSelectionServiceMock;
+ private Mock _fileTypeResolverMock;
+ private Mock _keyboardServiceMock;
+
+ #endregion
+
+ #region Tests Setup
+
+ [SetUp]
+ public void Setup()
+ {
+ _serviceProviderMock = new Mock();
+
+ _logMock = new Mock();
+ _logMock.Setup(l => l.LogMessage(It.IsAny(), It.IsAny())).Verifiable();
+
+ _optionsServiceMock = new Mock();
+
+ _shellHelperServiceMock = new Mock();
+ _shellHelperServiceMock.Setup(s => s.ExecuteCommand(It.IsNotNull(), null)).Verifiable();
+
+ _shellSelectionServiceMock = new Mock();
+ _shellSelectionServiceMock.Setup(s => s.IsContextActive(It.IsAny())).Returns(true).Verifiable();
+ _shellSelectionServiceMock.Setup(s => s.GetActiveProject()).Returns(new object()).Verifiable();
+
+ var webProject = false;
+ _fileTypeResolverMock = new Mock();
+ _fileTypeResolverMock.Setup(f => f.GetCurrentLanguage(It.IsAny