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