public int CompareTo(StoredItem other)
 {
     return(RelativePath.CompareTo(other.RelativePath));
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
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);
        }