示例#1
0
        public void EqualsToString(bool expected, string left, string right)
        {
            LocationData location = left;

            Assert.AreEqual(expected, location.Equals(right));

            if (expected)
            {
                Assert.AreEqual(0, location.CompareTo(right));
            }
            else
            {
                Assert.AreNotEqual(0, location.CompareTo(right));
            }
        }
示例#2
0
        public void EqualsToObject(bool expected, string left, string right)
        {
            LocationData loc1 = left;
            LocationData loc2 = right;

            Assert.AreEqual(expected, loc1.Equals(loc2));

            if (expected)
            {
                Assert.AreEqual(0, loc1.CompareTo(loc2));
            }
            else
            {
                Assert.AreNotEqual(0, loc1.CompareTo(loc2));
            }
        }
示例#3
0
        public void CompareToString(string left, string right, int expected)
        {
            LocationData location1 = left;

            Assert.AreEqual(expected, location1.CompareTo(right));
            if (right != null)
            {
                location1 = right;
                Assert.AreEqual(expected * -1, location1.CompareTo(left));
            }
        }
示例#4
0
        public void CompareToObject(string left, string right, int expected)
        {
            LocationData location1 = left;
            LocationData location2 = right;

            Assert.AreEqual(expected, location1.CompareTo(location2));
            if (right != null)
            {
                Assert.AreEqual(expected * -1, location2.CompareTo(location1));
            }
        }