public void Test_Contains_ObjectDoesNotExist() { var list = new BeatObjectList <BPM>(); var objects = new BPM[] { new BPM(100, 2), new BPM(100, 3), new BPM(100, 5), }; list.AddMultiple(objects); // New object isn't in the list. Assert.IsFalse(list.Contains(new BPM(123, 45))); // Copy of the first element added. Tests that it's checking the reference // and not the value. Assert.IsFalse(list.Contains(new BPM(100, 2))); }
public void Test_Contains_ObjectExists() { var list = new BeatObjectList <BPM>(); var objects = new BPM[] { new BPM(100, 2), new BPM(100, 3), new BPM(100, 5), }; list.AddMultiple(objects); foreach (var o in objects) { Assert.IsTrue(list.Contains(o)); } }
public void Test_Contains_NullReturnsFalse() { var list = new BeatObjectList <BPM>(); Assert.IsFalse(list.Contains(null)); }