mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 11:40:52 +01:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
26 lines
748 B
C#
26 lines
748 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using NUnit.Framework;
|
|
using Robust.Client.Input;
|
|
|
|
namespace Robust.UnitTesting.Client.Input
|
|
{
|
|
[Parallelizable(ParallelScope.All)]
|
|
public sealed class KeyboardTest
|
|
{
|
|
public static IEnumerable<object[]> TestCases =>
|
|
((Keyboard.Key[]) Enum.GetValues(typeof(Keyboard.Key)))
|
|
.Where(p => p.ToString().Contains("Mouse"))
|
|
.Select(p => new object[] {p, true});
|
|
|
|
[Test]
|
|
[TestCaseSource(nameof(TestCases))]
|
|
[TestCase(Keyboard.Key.A, false)]
|
|
public void TestKeyboardIsMouseKey(Keyboard.Key key, bool isMouse)
|
|
{
|
|
Assert.That(key.IsMouseKey(), Is.EqualTo(isMouse));
|
|
}
|
|
}
|
|
}
|