public void TestGetRngInstanceAt_ArgumentOutOfBounds() { SpawnFutureRng future = new SpawnFutureRng(); future.AddNextRngInstance(GetSpawnFutureRngInstance()); future.AddNextRngInstance(GetSpawnFutureRngInstance()); Assert.ThrowsException <ArgumentOutOfRangeException>( delegate { future.GetRngInstanceAt(2); }); }
public void TestGetRngInstanceAt() { SpawnFutureRng future = new SpawnFutureRng(); future.AddNextRngInstance(GetSpawnFutureRngInstance()); future.AddNextRngInstance(GetSpawnFutureRngInstance()); SpawnFutureRngInstance instance = GetSpawnFutureRngInstance(); instance.Index = 5; instance.CurrentHeal = 9999; future.AddNextRngInstance(instance); SpawnFutureRngInstance 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++) { SpawnFutureRngInstance rngInstance = _futureRng.GetRngInstanceAt(i); int rowNumber = dataGridView.Rows.Add(); DataGridViewRow row = dataGridView.Rows[rowNumber]; UpdateRowInfo(rngInstance, row); UpdateRowColor(rngInstance, row); if (rngInstance.IsPastRng) { row.DefaultCellStyle.BackColor = Color.LightGreen; } } }