public void ConvertFromTest(string expected, string input)
        {
            var c = new MultiKeyGestureConverter();
            var s = new MultiKeyGestureSerializer();

            var o = c.ConvertFrom(input);

            Assert.IsNotNull(o);
            Assert.IsInstanceOfType(o, typeof(MultiKeyGesture));
            var g = o as MultiKeyGesture;
            var t = s.ConvertToString(g, null);

            Assert.AreEqual(expected.ToLowerInvariant(), t.ToLowerInvariant());
        }
Esempio n. 2
0
        public void ConvertToStringTest()
        {
            var s = new MultiKeyGestureSerializer();
            var g = new MultiKeyGesture(new[]
            {
                new Gesture(Key.None, ModifierKeys.Control),
                new Gesture(Key.T),
                new Gesture(Key.E),
                new Gesture(Key.S),
                new Gesture(Key.T),
            });
            var res = s.ConvertToString(g, null);

            Assert.AreEqual("Control T E S T".ToLowerInvariant(), res.ToLowerInvariant());
        }