Example #1
0
        public void CompareToWithUnequalObjectTypes()
        {
            PartInstanceId first  = new PartInstanceId();
            object         second = new object();

            Assert.Throws <ArgumentException>(() => first.CompareTo(second));
        }
Example #2
0
        public void CompareToWithNullObject()
        {
            PartInstanceId first  = new PartInstanceId();
            object         second = null;

            Assert.AreEqual(1, first.CompareTo(second));
        }
Example #3
0
        public void CompareToOperatorWithEqualObjects()
        {
            var    first  = new PartInstanceId();
            object second = first.Clone();

            Assert.AreEqual(0, first.CompareTo(second));
        }
Example #4
0
        public void SmallerThanOperatorWithEqualObjects()
        {
            var first  = new PartInstanceId();
            var second = first.Clone();

            Assert.IsFalse(first < second);
        }
Example #5
0
        public void Clone()
        {
            PartInstanceId first  = new PartInstanceId();
            PartInstanceId second = first.Clone();

            Assert.AreEqual(first, second);
        }
Example #6
0
        public void SmallerThanOperatorWithBothObjectsNull()
        {
            PartInstanceId first  = null;
            PartInstanceId second = null;

            Assert.IsFalse(first < second);
        }
Example #7
0
        public void SmallerThanOperatorWithSecondObjectNull()
        {
            PartInstanceId first  = new PartInstanceId();
            PartInstanceId second = null;

            Assert.IsFalse(first < second);
        }
Example #8
0
        public void SmallerThanOperatorWithFirstObjectNull()
        {
            PartInstanceId first  = null;
            PartInstanceId second = new PartInstanceId();

            Assert.IsTrue(first < second);
        }
Example #9
0
        public void LargerThanOperatorWithSecondObjectNull()
        {
            PartInstanceId first  = new PartInstanceId();
            PartInstanceId second = null;

            Assert.IsTrue(first > second);
        }
Example #10
0
        public void LargerThanOperatorWithFirstObjectNull()
        {
            PartInstanceId first  = null;
            PartInstanceId second = new PartInstanceId();

            Assert.IsFalse(first > second);
        }