public void CompareToWithSmallerFirstObject() { MockId first = new MockId(10); object second = new MockId(11); Assert.IsTrue(first.CompareTo(second) < 0); }
public void CompareToWithUnequalObjectTypes() { MockId first = new MockId(10); object second = new object(); Assert.Throws <ArgumentException>(() => first.CompareTo(second)); }
public void CompareToWithNullObject() { MockId first = new MockId(10); object second = null; Assert.AreEqual(1, first.CompareTo(second)); }
public void CompareToOperatorWithEqualObjects() { MockId first = new MockId(10); object second = new MockId(10); Assert.AreEqual(0, first.CompareTo(second)); }
public void SmallerThanOperatorWithFirstObjectSmaller() { MockId first = new MockId(9); MockId second = new MockId(10); Assert.IsTrue(first < second); }
public void Clone() { MockId first = new MockId(10); MockId second = first.Clone(); Assert.AreEqual(first, second); }
public void SmallerThanOperatorWithEqualObjects() { MockId first = new MockId(10); MockId second = new MockId(10); Assert.IsFalse(first < second); }
public void SmallerThanOperatorWithFirstObjectLarger() { MockId first = new MockId(11); MockId second = new MockId(10); Assert.IsFalse(first < second); }
public void SmallerThanOperatorWithBothObjectsNull() { MockId first = null; MockId second = null; Assert.IsFalse(first < second); }
public void SmallerThanOperatorWithSecondObjectNull() { MockId first = new MockId(10); MockId second = null; Assert.IsFalse(first < second); }
public void LargerThanOperatorWithFirstObjectLarger() { MockId first = new MockId(11); MockId second = new MockId(10); Assert.IsTrue(first > second); }
public void LargerThanOperatorWithSecondObjectNull() { MockId first = new MockId(10); MockId second = null; Assert.IsTrue(first > second); }
public void LargerThanOperatorWithFirstObjectNull() { MockId first = null; MockId second = new MockId(10); Assert.IsFalse(first > second); }