Beispiel #1
0
        public void DateLessThanOperatorReturnsFalseIfLeftIsSameValueAsRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(47);

            Assert.IsFalse(left < right);
        }
Beispiel #2
0
        public void DateLessThanOperatorReturnsTrueIfLeftIsNullAndRightIsNotNull()
        {
            c.Date left  = null;
            c.Date right = new c.Date(46);

            Assert.IsTrue(left < right);
        }
Beispiel #3
0
        public void DateNotEqualsOperatorReturnsTrueIfLeftIsNotNullAndRightIsNull()
        {
            c.Date left  = new c.Date(47);
            c.Date right = null;

            Assert.IsTrue(left != right);
        }
Beispiel #4
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

            Assert.IsTrue(left >= right);
        }
Beispiel #5
0
        public void DateNotEqualsOperatorReturnsTrueIfLeftAndRightAreNotSameValue()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(46);

            Assert.IsTrue(left != right);
        }
Beispiel #6
0
        public void DateNotEqualsOperatorReturnsFalseIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

            Assert.IsFalse(left != right);
        }
Beispiel #7
0
        public void DateEqualsOperatorReturnsFalseIfLeftIsNullAndRightIsNotNull()
        {
            c.Date left  = null;
            c.Date right = new c.Date(47);

            Assert.IsFalse(left == right);
        }
Beispiel #8
0
        public void DateNotEqualsOperatorReturnsFalseIfLeftAndRightAreSameReference()
        {
            c.Date left  = new c.Date(47);
            c.Date right = left;

            Assert.IsFalse(left != right);
        }
Beispiel #9
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftIsNotNullAndRightIsNull()
        {
            c.Date left  = new c.Date(47);
            c.Date right = null;

            Assert.IsTrue(left >= right);
        }
Beispiel #10
0
        public void DateEqualsOperatorReturnsTrueIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

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

            Assert.IsFalse(date.Equals(other));
        }
Beispiel #12
0
        public void DateEqualsReturnsTrueIfOtherIsSameValue()
        {
            c.Date date  = new c.Date(47);
            c.Date other = new c.Date(47);

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

            Assert.IsFalse(date.Equals(other));
        }
Beispiel #14
0
        public void DateEqualsReturnsFalseIfOtherIsNull()
        {
            c.Date date  = new c.Date(47);
            c.Date other = null;

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

            Assert.IsFalse(left < right);
        }
Beispiel #16
0
        public void DateGreaterThanOrEqualOperatorReturnsFalseIfLeftIsLessThanRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(48);

            Assert.IsFalse(left >= right);
        }
Beispiel #17
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftIsSameReferenceAsRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = left;

            Assert.IsTrue(left >= right);
        }
Beispiel #18
0
        public void DateGreaterThanOperatorReturnsFalseIfLeftIsSameReferenceAsRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = left;

            Assert.IsFalse(left > right);
        }
Beispiel #19
0
        public void DateGreaterThanOrEqualOperatorReturnsTrueIfLeftIsGreaterThanRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(46);

            Assert.IsTrue(left >= right);
        }
Beispiel #20
0
        public void DateLessThanOrEqualOperatorReturnsFalseIfLeftIsNotNullAndRightIsNull()
        {
            c.Date left  = new c.Date(47);
            c.Date right = null;

            Assert.IsFalse(left <= right);
        }
Beispiel #21
0
        public void DateLessThanOrEqualOperatorReturnsTrueIfLeftIsLessThanRight()
        {
            c.Date left  = new c.Date(47);
            c.Date right = new c.Date(48);

            Assert.IsTrue(left <= right);
        }
Beispiel #22
0
        public void DateGreaterThanOperatorReturnsFalseIfLeftIsNullAndRightIsNotNull()
        {
            c.Date left  = null;
            c.Date right = new c.Date(46);

            Assert.IsFalse(left > right);
        }
Beispiel #23
0
        public void DateGreaterThanOperatorReturnsFalseIfLeftAndRightAreNull()
        {
            c.Date left  = null;
            c.Date right = null;

            Assert.IsFalse(left > right);
        }
Beispiel #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());
        }
Beispiel #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());
        }
Beispiel #26
0
        public void ConnectionGetsExpectedNullValueForDateCharacterId()
        {
            c.Date expected = new c.Date(int.MinValue);

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

            Assert.AreEqual(expected, result);
        }
Beispiel #27
0
        public void DateGetHashCodeReturnsExpectedHash()
        {
            const int expected = 47;

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

            Assert.AreEqual(expected, date.GetHashCode());
        }
Beispiel #28
0
        public void DateToDateTimeReturnsExpectedDateTimeIfValueIsInt32Max()
        {
            DateTime expected = DateTime.MaxValue;

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

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

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

            Assert.AreEqual(expected, result);
        }
Beispiel #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));
        }