예제 #1
0
        public void TestSignle()
        {
            string message = "";

            Regulus.Utility.KeyReader reader = new Regulus.Utility.KeyReader('\r');
            reader.DoneEvent += (chars) =>
            {
                message = new string(chars);
            };
            reader.Push('a');
            reader.Push('b');
            reader.Push('\r');

            Assert.AreEqual("ab", message);
        }
예제 #2
0
        public void TestMuti()
        {
            string message = "";

            Regulus.Utility.KeyReader reader = new Regulus.Utility.KeyReader('\r');
            reader.DoneEvent += (chars) =>
            {
                message = new string(chars);
            };
            reader.Push(new char[] { 'a', 'b', '\r' });



            Assert.AreEqual("ab", message);
        }