|
From: <fab...@us...> - 2009-06-01 01:14:27
|
Revision: 4396
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4396&view=rev
Author: fabiomaulo
Date: 2009-06-01 00:16:33 +0000 (Mon, 01 Jun 2009)
Log Message:
-----------
Fix NH-1735
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Type/TicksType.cs
trunk/nhibernate/src/NHibernate.Test/TypesTest/TicksTypeFixture.cs
Modified: trunk/nhibernate/src/NHibernate/Type/TicksType.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Type/TicksType.cs 2009-05-31 22:33:06 UTC (rev 4395)
+++ trunk/nhibernate/src/NHibernate/Type/TicksType.cs 2009-06-01 00:16:33 UTC (rev 4396)
@@ -96,7 +96,7 @@
public IComparer Comparator
{
- get { return Comparer<Int64>.Default; }
+ get { return Comparer<DateTime>.Default; }
}
#endregion
Modified: trunk/nhibernate/src/NHibernate.Test/TypesTest/TicksTypeFixture.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/TypesTest/TicksTypeFixture.cs 2009-05-31 22:33:06 UTC (rev 4395)
+++ trunk/nhibernate/src/NHibernate.Test/TypesTest/TicksTypeFixture.cs 2009-06-01 00:16:33 UTC (rev 4396)
@@ -28,5 +28,14 @@
TicksType type = (TicksType) NHibernateUtil.Ticks;
Assert.IsTrue(type.Seed(null) is DateTime, "seed should be DateTime");
}
+
+ [Test]
+ public void Comparer()
+ {
+ var type = (IVersionType)NHibernateUtil.Ticks;
+ object v1 = type.Seed(null);
+ var v2 = v1;
+ Assert.DoesNotThrow(() => type.Comparator.Compare(v1, v2));
+ }
}
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|