Exemple #1
0
        public void LargerThanOperatorWithFirstObjectNull()
        {
            CommunicationSubject first = null;
            var second = new CommunicationSubject("a");

            Assert.IsFalse(first > second);
        }
Exemple #2
0
        public void CompareToWithSmallerFirstObject()
        {
            var    first  = new CommunicationSubject("a");
            object second = new CommunicationSubject("b");

            Assert.IsTrue(first.CompareTo(second) < 0);
        }
Exemple #3
0
        public void CompareToWithUnequalObjectTypes()
        {
            var first  = new CommunicationSubject("a");
            var second = new object();

            Assert.Throws <ArgumentException>(() => first.CompareTo(second));
        }
Exemple #4
0
        public void CompareToWithNullObject()
        {
            var    first  = new CommunicationSubject("a");
            object second = null;

            Assert.AreEqual(1, first.CompareTo(second));
        }
Exemple #5
0
        public void CompareToOperatorWithEqualObjects()
        {
            var    first  = new CommunicationSubject("a");
            object second = new CommunicationSubject("a");

            Assert.AreEqual(0, first.CompareTo(second));
        }
Exemple #6
0
        public void SmallerThanOperatorWithFirstObjectSmaller()
        {
            var first  = new CommunicationSubject("a");
            var second = new CommunicationSubject("b");

            Assert.IsTrue(first < second);
        }
Exemple #7
0
        public void Clone()
        {
            var first  = new CommunicationSubject("a");
            var second = first.Clone();

            Assert.AreEqual(first, second);
        }
Exemple #8
0
        public void SmallerThanOperatorWithEqualObjects()
        {
            var first  = new CommunicationSubject("a");
            var second = new CommunicationSubject("a");

            Assert.IsFalse(first < second);
        }
Exemple #9
0
        public void SmallerThanOperatorWithBothObjectsNull()
        {
            CommunicationSubject first  = null;
            CommunicationSubject second = null;

            Assert.IsFalse(first < second);
        }
Exemple #10
0
        public void SmallerThanOperatorWithSecondObjectNull()
        {
            var first = new CommunicationSubject("a");
            CommunicationSubject second = null;

            Assert.IsFalse(first < second);
        }
Exemple #11
0
        public void SmallerThanOperatorWithFirstObjectNull()
        {
            CommunicationSubject first = null;
            var second = new CommunicationSubject("a");

            Assert.IsTrue(first < second);
        }
Exemple #12
0
        public void LargerThanOperatorWithSecondObjectNull()
        {
            var first = new CommunicationSubject("a");
            CommunicationSubject second = null;

            Assert.IsTrue(first > second);
        }