BattlefieldTests.KeyEventsTests.TestIfCorrectKeyIsSetWhenKeyEventIsCreated C# (CSharp) Метод

TestIfCorrectKeyIsSetWhenKeyEventIsCreated() приватный Метод

private TestIfCorrectKeyIsSetWhenKeyEventIsCreated ( ) : void
Результат void
        public void TestIfCorrectKeyIsSetWhenKeyEventIsCreated()
        {
            KeyEventArgs testEvent = new KeyEventArgs(ConsoleKey.D9);

            Assert.AreEqual(testEvent.PressedKey, ConsoleKey.D9, string.Format("The created event is not set with ConsoleKey.D9 as expected. Instead set key {0}", testEvent.PressedKey));
        }
    }