Exemplo n.º 1
0
        public void GetHashCode_NullId_Returns0()
        {
            var location = new RtmLocation(null);

            var actual = location.GetHashCode();

            Assert.AreEqual(0, actual);
        }
Exemplo n.º 2
0
        public void CompareTo_Null_Returns1()
        {
            var location = new RtmLocation("abc");

            var actual = location.CompareTo(null);

            Assert.AreEqual(1, actual);
        }
Exemplo n.º 3
0
        public void Equals_RtmLocationObject_ComparesLocationId(string id1, string id2, bool expected)
        {
            object location      = new RtmLocation(id1);
            object otherLocation = new RtmLocation(id2);

            var actual = location.Equals(otherLocation);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
        public void GetHashCode_RtmLocation_ReturnsHashOfId(string id)
        {
            var location = new RtmLocation(id);
            var expected = id.GetHashCode();

            var actual = location.GetHashCode();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 5
0
        public void CompareTo_RtmLocation_ComparesLocationId(string id1, string id2)
        {
            var location      = new RtmLocation(id1);
            var otherLocation = new RtmLocation(id2);
            var expected      = string.Compare(id1, id2, StringComparison.Ordinal);

            var actual = location.CompareTo(otherLocation);

            Assert.AreEqual(expected, actual);
        }