Exemple #1
0
            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++;
                }
            }
Exemple #2
0
 private void OnClearClicked(object sender, EventArgs e)
 {
     universe.Clear();
 }