Exemplo n.º 1
0
        public void T0127_CompareTo_LengthLimitedString_Larger_ReturnsMinusOne()
        {
            LengthLimitedStringForTest lls   = new LengthLimitedStringForTest("1");
            LengthLimitedStringForTest other = new LengthLimitedStringForTest("2");

            Assert.AreEqual(-1, lls.CompareTo(other));
        }
Exemplo n.º 2
0
        public void T0126_CompareTo_LengthLimitedString_Equal_ReturnsZero()
        {
            LengthLimitedStringForTest lls   = new LengthLimitedStringForTest("1");
            LengthLimitedStringForTest other = new LengthLimitedStringForTest("1");

            Assert.AreEqual(0, lls.CompareTo(other));
        }
Exemplo n.º 3
0
        public void T0125_CompareTo_LengthLimitedString_Smaller_ReturnsPlusOne()
        {
            LengthLimitedStringForTest lls   = new LengthLimitedStringForTest("2");
            LengthLimitedStringForTest other = new LengthLimitedStringForTest("1");

            Assert.AreEqual(1, lls.CompareTo(other));
        }
Exemplo n.º 4
0
        public void T0124_CompareTo_NotLengthLimitedString_ThrowsException()
        {
            LengthLimitedStringForTest lls = new LengthLimitedStringForTest();

            lls.CompareTo(new object());
        }
Exemplo n.º 5
0
        public void T0123_CompareTo_Null_ReturnsOne()
        {
            LengthLimitedStringForTest lls = new LengthLimitedStringForTest();

            Assert.AreEqual(1, lls.CompareTo(null));
        }