ProtractorTestAdapter.ProtractorTestContainer.CompareTo C# (CSharp) Method

CompareTo() public method

public CompareTo ( ITestContainer other ) : int
other ITestContainer
return int
        public int CompareTo(ITestContainer other)
        {
            var testContainer = other as ProtractorTestContainer;
            if (testContainer == null)
            {
                return -1;
            }

            var result = String.Compare(this.Source, testContainer.Source, StringComparison.OrdinalIgnoreCase);
            if (result != 0)
            {
                return result;
            }

            return this.timeStamp.CompareTo(testContainer.timeStamp);
        }