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")); }
public void JumpNotSet_Error() { var jumpTable = new JumpTable(); Assert.Throws <KeyNotFoundException>(() => jumpTable.Jump('a')); }
public State(string id, IEnumerable <Jump> jumps, [CanBeNull] string title) { Id = id; Title = title ?? "<No title>"; jumpTable = new JumpTable(jumps); }
public State(string id, JumpTable jumpTable, [CanBeNull] string title) : this(id, jumpTable.GetAllJumps(), title) { }