public void TestAddRange(bool track) { var events = 0; var acc = new Accumulator("test"); var dic = new TrackableDictionary <string, int>(acc, track) { { "one", 1 }, { "two", 2 } }; var other = new TrackableDictionary <string, int>() { { "three", 3 }, { "four", 4 } }; dic.CollectionChanged += (s, e) => { events++; Assert.AreEqual(e.Action, NotifyCollectionChangedAction.Reset); }; dic.AddRange(other); Assert.IsTrue(dic.ContainsKey("three")); Assert.IsTrue(dic.ContainsKey("four")); Assert.AreEqual(dic["three"], 3); Assert.AreEqual(dic["four"], 4); Assert.AreEqual(1, events); if (track) { Assert.AreEqual(4, acc.Records.Count); } else { Assert.AreEqual(0, acc.Records.Count); } }