public void TestNull() { TestInt ti = new TestInt(1); object? o = null; Assert.Greater(ti.CompareTo(o), 0); }
public void TestSame() { TestInt ti = new TestInt(1); object o = ti; Assert.AreEqual(0, ti.CompareTo(o)); }
public void TestArgumentException() { TestInt ti = new TestInt(1); object o = "test"; Assert.Throws <ArgumentException>(() => ti.CompareTo(o)); }
public void TestLessThan() { TestInt ti = new TestInt(1); object o = new TestInt(2); Assert.Less(ti.CompareTo(o), 0); }
public void TestEqual() { var ti = new TestInt(1); object o = new TestInt(1); Assert.AreEqual(0, ti.CompareTo(o)); }