-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Milestone
Description
The class https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/MouseDevice.cs does not allow right now to derive from it. This prevent any Mocking library to work.
As far as I can see is it enough to change the access modifier from
internal abstract MouseButtonState GetButtonStateFromSystem(MouseButton mouseButton);
Code to test with Moq:
var t = typeof(InputManager).GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[0], null);
var mouseDevice = new Moq.Mock<MouseDevice>((InputManager)t.Invoke(null)).Object;
lindexi, Mrxx99 and audioprog
Metadata
Metadata
Assignees
Labels
No labels