public void CompareToWithUnequalObjectTypes() { var first = new ValueAtTime <int>(new TimeMarker(10), 10); var second = new object(); Assert.Throws <ArgumentException>(() => first.CompareTo(second)); }
public void CompareToOperatorWithEqualObjects() { var first = new ValueAtTime <int>(new TimeMarker(10), 10); object second = new ValueAtTime <int>(new TimeMarker(10), 10); Assert.AreEqual(0, first.CompareTo(second)); }
public void CompareToWithSmallerFirstObject() { var first = new ValueAtTime <int>(new TimeMarker(10), 10); object second = new ValueAtTime <int>(new TimeMarker(20), 10); Assert.IsTrue(first.CompareTo(second) < 0); }
public void CompareToWithNullObject() { var first = new ValueAtTime <int>(new TimeMarker(10), 10); object second = null; Assert.AreEqual(1, first.CompareTo(second)); }