コード例 #1
0
        public void LargerThanOperatorWithFirstObjectNull()
        {
            ScheduleConditionRegistrationId first  = null;
            ScheduleConditionRegistrationId second = new ScheduleConditionRegistrationId(typeof(string), 0, "a");

            Assert.IsFalse(first > second);
        }
コード例 #2
0
        public void CompareToWithSmallerFirstObject()
        {
            var first  = new ScheduleConditionRegistrationId(typeof(string), 0, "a");
            var second = new ScheduleConditionRegistrationId(typeof(string), 0, "b");

            Assert.IsTrue(first.CompareTo(second) < 0);
        }
コード例 #3
0
        public void CompareToWithUnequalObjectTypes()
        {
            ScheduleConditionRegistrationId first = new ScheduleConditionRegistrationId(typeof(string), 0, "a");
            object second = new object();

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

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

            Assert.AreEqual(0, first.CompareTo(second));
        }
コード例 #6
0
        public void Clone()
        {
            ScheduleConditionRegistrationId first  = new ScheduleConditionRegistrationId(typeof(string), 0, "a");
            ScheduleConditionRegistrationId second = first.Clone();

            Assert.AreEqual(first, second);
        }
コード例 #7
0
        public void SmallerThanOperatorWithFirstObjectSmaller()
        {
            var first  = new ScheduleConditionRegistrationId(typeof(string), 0, "a");
            var second = new ScheduleConditionRegistrationId(typeof(string), 0, "b");

            Assert.IsTrue(first < second);
        }
コード例 #8
0
        public void SmallerThanOperatorWithEqualObjects()
        {
            var first  = new ScheduleConditionRegistrationId(typeof(string), 0, "a");
            var second = first.Clone();

            Assert.IsFalse(first < second);
        }
コード例 #9
0
        public void SmallerThanOperatorWithBothObjectsNull()
        {
            ScheduleConditionRegistrationId first  = null;
            ScheduleConditionRegistrationId second = null;

            Assert.IsFalse(first < second);
        }
コード例 #10
0
        public void SmallerThanOperatorWithSecondObjectNull()
        {
            ScheduleConditionRegistrationId first  = new ScheduleConditionRegistrationId(typeof(string), 0, "a");
            ScheduleConditionRegistrationId second = null;

            Assert.IsFalse(first < second);
        }