Beispiel #1
0
        public void SetJumps_ReadJumps()
        {
            var jumpTable = new JumpTable(new Jump('a', "10"), new Jump('b', "20"));

            Assert.That(jumpTable.Jump('a'), Is.EqualTo("10"));
            Assert.That(jumpTable.Jump('b'), Is.EqualTo("20"));
        }
Beispiel #2
0
        public void JumpNotSet_Error()
        {
            var jumpTable = new JumpTable();

            Assert.Throws <KeyNotFoundException>(() => jumpTable.Jump('a'));
        }
Beispiel #3
0
 public State(string id, IEnumerable <Jump> jumps, [CanBeNull] string title)
 {
     Id        = id;
     Title     = title ?? "<No title>";
     jumpTable = new JumpTable(jumps);
 }
Beispiel #4
0
 public State(string id, JumpTable jumpTable, [CanBeNull] string title)
     : this(id, jumpTable.GetAllJumps(), title)
 {
 }