public void TestGetRngInstanceAt_ArgumentOutOfBounds() { ChestFutureRng future = new ChestFutureRng(); future.AddNextRngInstance(GetChestFutureRngInstance()); future.AddNextRngInstance(GetChestFutureRngInstance()); Assert.ThrowsException <ArgumentOutOfRangeException>( delegate { future.GetRngInstanceAt(2); }); }
public void TestGetRngInstanceAt() { ChestFutureRng future = new ChestFutureRng(); future.AddNextRngInstance(GetChestFutureRngInstance()); future.AddNextRngInstance(GetChestFutureRngInstance()); ChestFutureRngInstance instance = GetChestFutureRngInstance(); instance.Index = 5; instance.CurrentHeal = 9999; future.AddNextRngInstance(instance); ChestFutureRngInstance copy = future.GetRngInstanceAt(2); Assert.AreEqual(instance.Index, copy.Index); Assert.AreEqual(instance.CurrentHeal, copy.CurrentHeal); }
private void UpdateDataGridView() { int positionsCalculated = _futureRng.GetTotalFutureRngPositions(); for (int i = 0; i < positionsCalculated; i++) { ChestFutureRngInstance rngInstance = _futureRng.GetRngInstanceAt(i); int rowNumber = dataGridView.Rows.Add(); DataGridViewRow row = dataGridView.Rows[rowNumber]; UpdateRowStandardInfo(rngInstance, row); UpdateRowChestInfo(rngInstance, row); if (rngInstance.IsPastRng) { row.DefaultCellStyle.BackColor = Color.LightGreen; } } }