Browse Source

add mock thread interface to touch device tests

pull/9652/head
Emmanuel Hansen 3 years ago
parent
commit
be843f699a
  1. 2
      tests/Avalonia.Base.UnitTests/Input/TouchDeviceTests.cs

2
tests/Avalonia.Base.UnitTests/Input/TouchDeviceTests.cs

@ -207,7 +207,7 @@ namespace Avalonia.Input.UnitTests
private IDisposable UnitTestApp(TimeSpan doubleClickTime = new TimeSpan()) private IDisposable UnitTestApp(TimeSpan doubleClickTime = new TimeSpan())
{ {
var unitTestApp = UnitTestApplication.Start( var unitTestApp = UnitTestApplication.Start(
new TestServices(inputManager: new InputManager())); new TestServices(inputManager: new InputManager(), threadingInterface: Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true)));
var iSettingsMock = new Mock<IPlatformSettings>(); var iSettingsMock = new Mock<IPlatformSettings>();
iSettingsMock.Setup(x => x.GetDoubleTapTime(It.IsAny<PointerType>())).Returns(doubleClickTime); iSettingsMock.Setup(x => x.GetDoubleTapTime(It.IsAny<PointerType>())).Returns(doubleClickTime);
iSettingsMock.Setup(x => x.GetDoubleTapSize(It.IsAny<PointerType>())).Returns(new Size(16, 16)); iSettingsMock.Setup(x => x.GetDoubleTapSize(It.IsAny<PointerType>())).Returns(new Size(16, 16));

Loading…
Cancel
Save