Пример #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"));
        }
Пример #2
0
        public void JumpNotSet_Error()
        {
            var jumpTable = new JumpTable();

            Assert.Throws <KeyNotFoundException>(() => jumpTable.Jump('a'));
        }
Пример #3
0
 public string Jump(char letter)
 {
     return(jumpTable.Jump(letter));
 }