improve Mouse and GamePad test
This commit is contained in:
parent
467be0df38
commit
9e0bdcd9dc
@ -95,8 +95,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Input
|
||||
public void Setup()
|
||||
{
|
||||
AddInSystemFactory.Instance.Initialize();
|
||||
AddInSystemFactory.Instance.SetPreferredSystem(AddInType.InputSystem, "Test");
|
||||
|
||||
if (AddInSystemFactory.Instance.GetPreferredSystem(AddInType.InputSystem) == null)
|
||||
{
|
||||
AddInSystemFactory.Instance.SetPreferredSystem(AddInType.InputSystem, "Test");
|
||||
}
|
||||
}
|
||||
|
||||
[TestCaseSource("playergets")]
|
||||
|
@ -76,9 +76,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Input
|
||||
public void Setup()
|
||||
{
|
||||
AddInSystemFactory.Instance.Initialize();
|
||||
AddInSystemFactory.Instance.SetPreferredSystem(
|
||||
AddInType.InputSystem, "Test");
|
||||
|
||||
if (AddInSystemFactory.Instance.GetPreferredSystem(AddInType.InputSystem) == null)
|
||||
{
|
||||
AddInSystemFactory.Instance.SetPreferredSystem(AddInType.InputSystem, "Test");
|
||||
}
|
||||
}
|
||||
|
||||
[TestCaseSource("twoInt")]
|
||||
@ -87,6 +88,14 @@ namespace ANX.Framework.TestCenter.Strukturen.Input
|
||||
ANXMouse.SetPosition(x, y);
|
||||
AssertHelper.ConvertEquals(new ANXMouseState(x, y, 0, ANXButtonState.Released, ANXButtonState.Released, ANXButtonState.Released, ANXButtonState.Released, ANXButtonState.Released), ANXMouse.GetState(), "GetState");
|
||||
|
||||
}
|
||||
}
|
||||
[TestCaseSource("twoInt")]
|
||||
public void WindowHandle(int x, int y)
|
||||
{
|
||||
ANXMouse.SetPosition(x, y);
|
||||
ANXMouse.WindowHandle = new IntPtr(x);
|
||||
AssertHelper.ConvertEquals((int)ANXMouse.WindowHandle, x, "WindowHandle");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user