Example #1
0
        public void CompareToTest()
        {
            var territory1 = new Territory()
            {
                TerritoryId = 1
            };

            var territory2 = new Territory()
            {
                TerritoryId = 2
            };

            Assert.AreEqual(-1, territory1.CompareTo(territory2));
            Assert.AreEqual(1, territory2.CompareTo(territory1));
            Assert.Throws <ArgumentException>(() => territory1.CompareTo(new object()));
        }