Files
RobustToolbox/Robust.Client.Tests/Input/KeyboardTest.cs
PJB3005 788e9386fd Split up test project
Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests.

Tests are now split into separate projects as appropriate, and the API side has also been split off.
2025-12-16 01:36:53 +01:00

23 lines
675 B
C#

using NUnit.Framework;
using Robust.Client.Input;
namespace Robust.Client.Tests.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));
}
}
}