Пример #1
0
        public void DateLessThanOperatorReturnsFalseIfLeftIsSameValueAsRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(47);

            Assert.IsFalse(left < right);
        }
Пример #2
0
        public void DateLessThanOperatorReturnsTrueIfLeftIsNullAndRightIsNotNull()
        {
            c.Date left  = null;
            c.Date right = new c.Date(46);

            Assert.IsTrue(left < right);
        }
Пример #3
0
        public void DateNotEqualsOperatorReturnsTrueIfLeftIsNotNullAndRightIsNull()
        {
            c.Date left  = new c.Date(47);
            c.Date right = null;

            Assert.IsTrue(left != right);
        }
Пример #4
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

            Assert.IsTrue(left >= right);
        }
Пример #5
0
        public void DateNotEqualsOperatorReturnsTrueIfLeftAndRightAreNotSameValue()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(46);

            Assert.IsTrue(left != right);
        }
Пример #6
0
        public void DateNotEqualsOperatorReturnsFalseIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

            Assert.IsFalse(left != right);
        }
Пример #7
0
        public void DateEqualsOperatorReturnsFalseIfLeftIsNullAndRightIsNotNull()
        {
            c.Date left  = null;
            c.Date right = new c.Date(47);

            Assert.IsFalse(left == right);
        }
Пример #8
0
        public void DateNotEqualsOperatorReturnsFalseIfLeftAndRightAreSameReference()
        {
            c.Date left  = new c.Date(47);
            c.Date right = left;

            Assert.IsFalse(left != right);
        }
Пример #9
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftIsNotNullAndRightIsNull()
        {
            c.Date left  = new c.Date(47);
            c.Date right = null;

            Assert.IsTrue(left >= right);
        }
Пример #10
0
        public void DateEqualsOperatorReturnsTrueIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

            Assert.IsTrue(left == right);
        }
Пример #11
0
        public void DateEqualsReturnsFalseIfOtherIsDifferentValue()
        {
            c.Date date  = new c.Date(47);
            c.Date other = new c.Date(45);

            Assert.IsFalse(date.Equals(other));
        }
Пример #12
0
        public void DateEqualsReturnsTrueIfOtherIsSameValue()
        {
            c.Date date  = new c.Date(47);
            c.Date other = new c.Date(47);

            Assert.IsTrue(date.Equals(other));
        }
Пример #13
0
        public void DateEqualsReturnsFalseIfOtherIsNotTypeOfDate()
        {
            c.Date date  = new c.Date(47);
            Task   other = new Task(() => { });

            Assert.IsFalse(date.Equals(other));
        }
Пример #14
0
        public void DateEqualsReturnsFalseIfOtherIsNull()
        {
            c.Date date  = new c.Date(47);
            c.Date other = null;

            Assert.IsFalse(date.Equals(other));
        }
Пример #15
0
        public void DateLessThanOperatorReturnsFalseIfLeftIsGreaterThanRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(46);

            Assert.IsFalse(left < right);
        }
Пример #16
0
        public void DateGreaterThanOrEqualOperatorReturnsFalseIfLeftIsLessThanRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(48);

            Assert.IsFalse(left >= right);
        }
Пример #17
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftIsSameReferenceAsRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = left;

            Assert.IsTrue(left >= right);
        }
Пример #18
0
        public void DateGreaterThanOperatorReturnsFalseIfLeftIsSameReferenceAsRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = left;

            Assert.IsFalse(left > right);
        }
Пример #19
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftIsGreaterThanRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(46);

            Assert.IsTrue(left >= right);
        }
Пример #20
0
        public void DateLessThanOrEqualOperatorReturnsFalseIfLeftIsNotNullAndRightIsNull()
        {
            c.Date left  = new c.Date(47);
            c.Date right = null;

            Assert.IsFalse(left <= right);
        }
Пример #21
0
        public void DateLessThanOrEqualOperatorReturnsTrueIfLeftIsLessThanRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(48);

            Assert.IsTrue(left <= right);
        }
Пример #22
0
        public void DateGreaterThanOperatorReturnsFalseIfLeftIsNullAndRightIsNotNull()
        {
            c.Date left  = null;
            c.Date right = new c.Date(46);

            Assert.IsFalse(left > right);
        }
Пример #23
0
        public void DateGreaterThanOperatorReturnsFalseIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

            Assert.IsFalse(left > right);
        }
Пример #24
0
        public void DateToDateTimeReturnsExpectedDateTimeIfValueIsInt32Min()
        {
            DateTime expected = DateTime.MinValue.AddTicks(1L);

            c.Date date = new c.Date(int.MinValue + 1);

            Assert.AreEqual(expected, date.DateTime());
        }
Пример #25
0
        public void DateToDateTimeReturnsExpectedDateTime()
        {
            DateTime expected = new DateTime(2020, 11, 04, 0, 0, 0, DateTimeKind.Utc);

            c.Date date = new c.Date(expected);

            Assert.AreEqual(expected, date.DateTime());
        }
Пример #26
0
        public void ConnectionGetsExpectedNullValueForDateCharacterId()
        {
            c.Date expected = new c.Date(int.MinValue);

            var result = c.NULL('d');

            Assert.AreEqual(expected, result);
        }
Пример #27
0
        public void DateGetHashCodeReturnsExpectedHash()
        {
            const int expected = 47;

            c.Date date = new c.Date(expected);

            Assert.AreEqual(expected, date.GetHashCode());
        }
Пример #28
0
        public void DateToDateTimeReturnsExpectedDateTimeIfValueIsInt32Max()
        {
            DateTime expected = DateTime.MaxValue;

            c.Date date = new c.Date(int.MaxValue);

            Assert.AreEqual(expected, date.DateTime());
        }
Пример #29
0
        public void ConnectionGetsExpectedNullValueFromDateType()
        {
            c.Date expected = new c.Date(int.MinValue);

            var result = c.NULL(typeof(c.Date));

            Assert.AreEqual(expected, result);
        }
Пример #30
0
        public void DateCompareToReturnsMinusOneIfOtherIsMoreThanValue()
        {
            const int expected = -1;

            c.Date date  = new c.Date(47);
            c.Date other = new c.Date(48);

            Assert.AreEqual(expected, date.CompareTo(other));
        }