Esempio n. 1
0
        public void CompareToWithUnequalObjectTypes()
        {
            var    first  = new DatasetId(10);
            object second = new object();

            Assert.Throws <ArgumentException>(() => first.CompareTo(second));
        }
Esempio n. 2
0
        public void CompareToOperatorWithEqualObjects()
        {
            var    first  = new DatasetId(10);
            object second = new DatasetId(10);

            Assert.AreEqual(0, first.CompareTo(second));
        }
Esempio n. 3
0
        public void CompareToWithSmallerFirstObject()
        {
            var    first  = new DatasetId(10);
            object second = new DatasetId(11);

            Assert.IsTrue(first.CompareTo(second) < 0);
        }
Esempio n. 4
0
        public void CompareToWithNullObject()
        {
            var    first  = new DatasetId(10);
            object second = null;

            Assert.AreEqual(1, first.CompareTo(second));
        }