private static void UpdateNotificationCount(NotifyCollectionChangedEventArgs e, NotifyActionCount notifyCount) { switch (e.Action) { case NotifyCollectionChangedAction.Add: ++notifyCount.AddCount; break; case NotifyCollectionChangedAction.Remove: ++notifyCount.RemoveCount; break; case NotifyCollectionChangedAction.Replace: ++notifyCount.ReplaceCount; break; case NotifyCollectionChangedAction.Move: ++notifyCount.MoveCount; break; case NotifyCollectionChangedAction.Reset: ++notifyCount.ResetCount; break; default: break; } }
// Use simple string comparison instead of IEquatable<T> private void AreEqual(NotifyActionCount expected, NotifyActionCount actual) { Assert.AreEqual(expected.ToString(), actual.ToString()); }