public void BeforeEveryTest()
 {
     _automaton = new FiniteAutomaton("S", '0', '1');
     _automaton.Transition("S", '0', "S");
     _automaton.Transition("S", '1', "F");
     _automaton.Final("F");
 }
        public void Should_allow_epsilon_transitions()
        {
            var automaton2 = new FiniteAutomaton("S", '0');
            automaton2.Transition("S", null, "S'");
            automaton2.Transition("S'", '0', "F");
            automaton2.Final("F");

            Assert.That(automaton2.Compute("0"), Is.True);
        }
        public void Should_be_non_deterministic()
        {
            var automaton2 = new FiniteAutomaton("S", '0', '1');
            automaton2.Transition("S", '0', "S");
            automaton2.Transition("S", '1', "S");
            automaton2.Transition("S", '1', "F");
            automaton2.Final("F");

            Assert.That(automaton2.Compute("1101"), Is.True);
        }