Beispiel #1
0
        public void LargerThanOperatorWithFirstObjectNull()
        {
            ExportRegistrationId first  = null;
            ExportRegistrationId second = new ExportRegistrationId(typeof(string), 0, "a");

            Assert.IsFalse(first > second);
        }
Beispiel #2
0
        public void CompareToWithSmallerFirstObject()
        {
            var first  = new ExportRegistrationId(typeof(string), 0, "a");
            var second = new ExportRegistrationId(typeof(string), 0, "b");

            Assert.IsTrue(first.CompareTo(second) < 0);
        }
Beispiel #3
0
        public void CompareToWithUnequalObjectTypes()
        {
            ExportRegistrationId first = new ExportRegistrationId(typeof(string), 0, "a");
            object second = new object();

            Assert.Throws <ArgumentException>(() => first.CompareTo(second));
        }
Beispiel #4
0
        public void CompareToWithNullObject()
        {
            ExportRegistrationId first = new ExportRegistrationId(typeof(string), 0, "a");
            object second = null;

            Assert.AreEqual(1, first.CompareTo(second));
        }
Beispiel #5
0
        public void CompareToOperatorWithEqualObjects()
        {
            var    first  = new ExportRegistrationId(typeof(string), 0, "a");
            object second = first.Clone();

            Assert.AreEqual(0, first.CompareTo(second));
        }
Beispiel #6
0
        public void Clone()
        {
            ExportRegistrationId first  = new ExportRegistrationId(typeof(string), 0, "a");
            ExportRegistrationId second = first.Clone();

            Assert.AreEqual(first, second);
        }
Beispiel #7
0
        public void SmallerThanOperatorWithFirstObjectSmaller()
        {
            var first  = new ExportRegistrationId(typeof(string), 0, "a");
            var second = new ExportRegistrationId(typeof(string), 0, "b");

            Assert.IsTrue(first < second);
        }
Beispiel #8
0
        public void SmallerThanOperatorWithEqualObjects()
        {
            var first  = new ExportRegistrationId(typeof(string), 0, "a");
            var second = first.Clone();

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

            Assert.IsFalse(first < second);
        }
Beispiel #10
0
        public void SmallerThanOperatorWithSecondObjectNull()
        {
            ExportRegistrationId first  = new ExportRegistrationId(typeof(string), 0, "a");
            ExportRegistrationId second = null;

            Assert.IsFalse(first < second);
        }