private void UpdateAdvanceData() { AdvanceDirections directions1 = _futureRng.GetAdvanceDirectionsAtIndex(0); tbAppear1.Text = FormUtils.ConvertDirectionsToText(directions1.AdvanceToAppear); tbItem1.Text = FormUtils.ConvertDirectionsToText(directions1.AdvanceForItem); AdvanceDirections directions2 = _futureRng.GetAdvanceDirectionsAtIndex(1); tbAppear2.Text = FormUtils.ConvertDirectionsToText(directions2.AdvanceToAppear); tbItem2.Text = FormUtils.ConvertDirectionsToText(directions2.AdvanceForItem); }
public void TestGetAdvanceDirectionsAt_ArgumentOutOfBounds() { ChestFutureRng future = new ChestFutureRng(); future.AddAdvanceDirections(GetAdvanceDirections()); future.AddAdvanceDirections(GetAdvanceDirections()); future.AddAdvanceDirections(GetAdvanceDirections()); Assert.ThrowsException <ArgumentOutOfRangeException>( delegate { future.GetAdvanceDirectionsAtIndex(3); }); }
public void TestGetAdvanceDirectionsAt() { ChestFutureRng future = new ChestFutureRng(); future.AddAdvanceDirections(GetAdvanceDirections()); future.AddAdvanceDirections(GetAdvanceDirections()); future.AddAdvanceDirections(GetAdvanceDirections()); AdvanceDirections directions = GetAdvanceDirections(); directions.AdvanceForItem = 7; directions.AdvanceToAppear = 24; future.AddAdvanceDirections(directions); AdvanceDirections copy = future.GetAdvanceDirectionsAtIndex(3); Assert.AreEqual(directions.AdvanceForItem, copy.AdvanceForItem); Assert.AreEqual(directions.AdvanceToAppear, copy.AdvanceToAppear); }