public void EventFiresExactlyOnceOnClear() { var eventCount = 0; var universe = new Universe(10, 10); universe.CellsChanged += OnCellsChanged; universe.Clear(); Assert.Equal(1, eventCount); void OnCellsChanged(object sender, EventArgs e) { eventCount++; } }
private void OnClearClicked(object sender, EventArgs e) { universe.Clear(); }