Index: Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs =================================================================== diff -u -re46802a7911218840bbdb5db34cf2afec497ce7b -r799f2ce41aeecea9dfd09492ff224cda81c4e9f2 --- Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision e46802a7911218840bbdb5db34cf2afec497ce7b) +++ Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision 799f2ce41aeecea9dfd09492ff224cda81c4e9f2) @@ -1360,17 +1360,14 @@ DataGridViewCell dataGridViewCell = control.GetCell(0, 0); control.SetCurrentCell(dataGridViewCell); - var counter = 0; - control.CellFormatting += (sender, args) => counter++; + var handlerExecuted = false; + control.CellFormatting += (sender, args) => handlerExecuted = true; - // Precondition - Assert.AreEqual(0, counter); - // Call object formattedValue = dataGridViewCell.FormattedValue; // Need to do this to fire the CellFormatting event. // Assert - Assert.AreEqual(1, counter); + Assert.IsTrue(handlerExecuted); } }