Exemple #1
0
        public void CompareToWithUnequalObjectTypes()
        {
            var first  = new NotificationName("name");
            var second = new object();

            Assert.Throws <ArgumentException>(() => first.CompareTo(second));
        }
Exemple #2
0
        public void CompareToOperatorWithEqualObjects()
        {
            var    first  = new NotificationName("name");
            object second = first.Clone();

            Assert.AreEqual(0, first.CompareTo(second));
        }
Exemple #3
0
        public void CompareToWithSmallerFirstObject()
        {
            var first  = new NotificationName("a");
            var second = new NotificationName("b");

            Assert.IsTrue(first.CompareTo(second) < 0);
        }
Exemple #4
0
        public void EqualsWithUnequalObjectTypes()
        {
            var first  = new NotificationName("name");
            var second = new object();

            Assert.IsFalse(first.Equals(second));
        }
Exemple #5
0
        public void CompareToWithNullObject()
        {
            var    first  = new NotificationName("name");
            object second = null;

            Assert.AreEqual(1, first.CompareTo(second));
        }
Exemple #6
0
        public void EqualsWithEqualObjects()
        {
            var    first  = new NotificationName("name");
            object second = first.Clone();

            Assert.IsTrue(first.Equals(second));
        }
Exemple #7
0
        public void EqualsWithUnequalObjects()
        {
            var    first  = new NotificationName("name1");
            object second = new NotificationName("name2");

            Assert.IsFalse(first.Equals(second));
        }
Exemple #8
0
        public void Clone()
        {
            var first  = new NotificationName("name");
            var second = first.Clone();

            Assert.AreEqual(first, second);
        }
Exemple #9
0
        public void EqualsWithNullObject()
        {
            var    first  = new NotificationName("name");
            object second = null;

            Assert.IsFalse(first.Equals(second));
        }
Exemple #10
0
        public void SmallerThanOperatorWithEqualObjects()
        {
            var first  = new NotificationName("name");
            var second = first.Clone();

            Assert.IsFalse(first < second);
        }
Exemple #11
0
        public void SmallerThanOperatorWithFirstObjectSmaller()
        {
            var first  = new NotificationName("a");
            var second = new NotificationName("b");

            Assert.IsTrue(first < second);
        }
Exemple #12
0
        public void SmallerThanOperatorWithBothObjectsNull()
        {
            NotificationName first  = null;
            NotificationName second = null;

            Assert.IsFalse(first < second);
        }
Exemple #13
0
        public void SmallerThanOperatorWithSecondObjectNull()
        {
            var first = new NotificationName("name");
            NotificationName second = null;

            Assert.IsFalse(first < second);
        }
Exemple #14
0
        public void SmallerThanOperatorWithFirstObjectNull()
        {
            NotificationName first = null;
            var second             = new NotificationName("name");

            Assert.IsTrue(first < second);
        }
Exemple #15
0
        public void LargerThanOperatorWithSecondObjectNull()
        {
            var first = new NotificationName("name");
            NotificationName second = null;

            Assert.IsTrue(first > second);
        }
Exemple #16
0
        public void LargerThanOperatorWithFirstObjectNull()
        {
            NotificationName first = null;
            var second             = new NotificationName("name");

            Assert.IsFalse(first > second);
        }