public void Test_Clear_ClearsList() { var list = new BeatObjectList <BPM>(); list.Add(new BPM(100, 0)); list.Add(new BPM(100, 5)); list.Clear(); Assert.AreEqual(0, list.Count); }
public void Test_Clear_FiresClearedEvent() { var list = new BeatObjectList <BPM>(); list.Add(new BPM(100, 0)); list.Add(new BPM(100, 5)); var calls = 0; list.Cleared += delegate { calls++; }; list.Clear(); Assert.AreEqual(1, calls); Assert.AreEqual(0, list.Count); }