public void GetHashCode_NullId_Returns0() { var location = new RtmLocation(null); var actual = location.GetHashCode(); Assert.AreEqual(0, actual); }
public void CompareTo_Null_Returns1() { var location = new RtmLocation("abc"); var actual = location.CompareTo(null); Assert.AreEqual(1, actual); }
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); }
public void GetHashCode_RtmLocation_ReturnsHashOfId(string id) { var location = new RtmLocation(id); var expected = id.GetHashCode(); var actual = location.GetHashCode(); Assert.AreEqual(expected, actual); }
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); }