Esempio n. 1
0
        public void readLetter_passExpression_returnParsedTransition()
        {
            string     input          = "a";
            Transition expectedResult = new Transition("a", new Node("q0"), null);
            var        list           = new List <Transition>();

            RegexReader.readLetter(ref list, input);
            Transition testResult = list[0];

            Assert.AreEqual(expectedResult.Letter, testResult.Letter);
        }
Esempio n. 2
0
        public void readLetter_passNothing_returnParsedTransitionWithEpsilonAndLastNode()
        {
            Transition expectedResult = new Transition("_", new Node("q0"), null);

            var list = new List <Transition>();

            RegexReader.readLetter(ref list);
            Transition testResult = list[0];

            Assert.AreEqual(expectedResult.Letter, testResult.Letter);
        }