diff --git a/tests/Perspex.Controls.UnitTests/Perspex.Controls.UnitTests.csproj b/tests/Perspex.Controls.UnitTests/Perspex.Controls.UnitTests.csproj
index f299a47e6d..c441eedf59 100644
--- a/tests/Perspex.Controls.UnitTests/Perspex.Controls.UnitTests.csproj
+++ b/tests/Perspex.Controls.UnitTests/Perspex.Controls.UnitTests.csproj
@@ -88,6 +88,7 @@
+
diff --git a/tests/Perspex.Controls.UnitTests/Primitives/PopupTests.cs b/tests/Perspex.Controls.UnitTests/Primitives/PopupTests.cs
index 18d7867b0f..172d2320f1 100644
--- a/tests/Perspex.Controls.UnitTests/Primitives/PopupTests.cs
+++ b/tests/Perspex.Controls.UnitTests/Primitives/PopupTests.cs
@@ -267,7 +267,7 @@ namespace Perspex.Controls.UnitTests.Primitives
PerspexLocator.CurrentMutable
.Bind().ToTransient()
.Bind().ToFunc(() => globalStyles.Object)
- .Bind().ToConstant(new Mock().Object)
+ .Bind().ToConstant(new WindowingPlatformMock())
.Bind().ToTransient();
return result;
diff --git a/tests/Perspex.Controls.UnitTests/Primitives/WindowingPlatformMock.cs b/tests/Perspex.Controls.UnitTests/Primitives/WindowingPlatformMock.cs
new file mode 100644
index 0000000000..bb879929a5
--- /dev/null
+++ b/tests/Perspex.Controls.UnitTests/Primitives/WindowingPlatformMock.cs
@@ -0,0 +1,21 @@
+using System;
+using Moq;
+using Perspex.Platform;
+
+namespace Perspex.Controls.UnitTests.Primitives
+{
+ class WindowingPlatformMock : IWindowingPlatform
+ {
+ public IWindowImpl CreateWindow()
+ {
+ return new Mock().Object;
+ }
+
+ public IWindowImpl CreateDesignerFriendlyWindow()
+ {
+ throw new NotImplementedException();
+ }
+
+ public IPopupImpl CreatePopup() => new Mock().Object;
+ }
+}
\ No newline at end of file
diff --git a/tests/Perspex.Controls.UnitTests/Utils/HotKeyManagerTests.cs b/tests/Perspex.Controls.UnitTests/Utils/HotKeyManagerTests.cs
index 40949e624a..6cdcd81539 100644
--- a/tests/Perspex.Controls.UnitTests/Utils/HotKeyManagerTests.cs
+++ b/tests/Perspex.Controls.UnitTests/Utils/HotKeyManagerTests.cs
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
using Moq;
using Perspex.Controls.Presenters;
using Perspex.Controls.Templates;
+using Perspex.Controls.UnitTests.Primitives;
using Perspex.Input;
using Perspex.Platform;
using Perspex.Styling;
@@ -20,11 +21,10 @@ namespace Perspex.Controls.UnitTests.Utils
{
using (PerspexLocator.EnterScope())
{
- var windowImpl = new Mock();
var styler = new Mock();
PerspexLocator.CurrentMutable
- .Bind().ToConstant(windowImpl.Object)
+ .Bind().ToConstant(new WindowingPlatformMock())
.Bind().ToConstant(styler.Object);
var gesture1 = new KeyGesture {Key = Key.A, Modifiers = InputModifiers.Control};