public int CompareTo(StoredItem other) { return(RelativePath.CompareTo(other.RelativePath)); }
public void RelativePath_Unit_CompareTo2_ObjIsSmaller() { String[] nodes = new String[] { "sites" }; Char separator = RelativePath.ForwardSlash; IComparable target = new RelativePath(nodes, separator); Object obj = new RelativePath(new String[] { "site" }, separator); Int32 actual = target.CompareTo(obj); Assert.AreEqual(1, actual); }
public void RelativePath_Unit_CompareTo1_OtherIsSmaller() { String[] nodes = new String[] { "sites" }; Char separator = RelativePath.ForwardSlash; RelativePath target = new RelativePath(nodes, separator); RelativePath other = new RelativePath(new String[] { "site" }, separator); Int32 actual = target.CompareTo(other); Assert.AreEqual(1, actual); }
public void RelativePath_Unit_CompareTo2_ObjIsGreater() { String[] nodes = new String[] { "sites" }; Char separator = RelativePath.ForwardSlash; IComparable target = new RelativePath(nodes, separator); Object obj = new RelativePath(new String[] { "sites1" }, separator); Int32 actual = target.CompareTo(obj); Assert.IsTrue(actual < 0); }
public void RelativePath_Unit_CompareTo1_OtherIsGreater() { String[] nodes = new String[] { "sites" }; Char separator = RelativePath.ForwardSlash; RelativePath target = new RelativePath(nodes, separator); RelativePath other = new RelativePath(new String[] { "sites1" }, separator); Int32 actual = target.CompareTo(other); Assert.IsTrue(actual < 0); }