mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
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.
23 lines
675 B
C#
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));
|
|
}
|
|
}
|
|
}
|