public void Next()
        {
            DateTimeType type    = (DateTimeType)NHibernateUtil.DateTime2;
            object       current = DateTime.Now.AddMilliseconds(-1);
            object       next    = type.Next(current, null);

            next.Should().Be.OfType <DateTime>().And.Value.Should().Be.GreaterThan((DateTime)current);
        }
Пример #2
0
        public void Next()
        {
            DateTimeType type    = NHibernateUtil.DateTime2;
            object       current = DateTime.Now.AddMilliseconds(-1);
            object       next    = type.Next(current, null);

            Assert.That(next, Is.TypeOf <DateTime>().And.GreaterThan(current));
        }
        public void Next()
        {
            DateTimeType type    = (DateTimeType)NHibernateUtil.DateTime;
            object       current = DateTime.Parse("2004-01-01");
            object       next    = type.Next(current, null);

            Assert.IsTrue(next is DateTime, "Next should be DateTime");
            Assert.IsTrue((DateTime)next > (DateTime)current,
                          "next should be greater than current (could be equal depending on how quickly this occurs)");
        }