예제 #1
0
        protected static void AssertSingle(string input, KeyInput expected = null)
        {
            var opt = KeyNotationUtil.TryStringToKeyInput(input);

            if (expected != null)
            {
                Assert.True(opt.IsSome());
                Assert.Equal(expected, opt.Value);
                Assert.Equal(expected, KeyNotationUtil.StringToKeyInput(input));
            }
            else
            {
                Assert.True(opt.IsNone());
            }
        }
예제 #2
0
 public void TryStringToKeyInput_BadModifier()
 {
     Assert.True(KeyNotationUtil.TryStringToKeyInput("<b-j>").IsNone());
 }