Hi --
I'm running version 1.2005.1 Final (October 23, 2005).
Maybe I'm missing something here, but date comparisons are driving me a little crazy.
In the NUnit test below, two dates that before they are saved to the db (SQL Server 2000) are "Equal." After the Entity is saved to the database, they are no longer equal. The NUnit test fails on the last assert. (The date field is stored as a DateTime in SQL Server.)
[NUnit.Framework.Test()]
public void DateTest ()
{
DateTime t1 = DateTime.Now;
DateTime t2 = t1;
HtmlStyleSheetEntity entity = new HtmlStyleSheetEntity();
entity.Active = true;
entity.CreateUserId = 2;
entity.CreateDate = t1;
Assert.AreEqual(t1, t2);
Assert.AreEqual(t1, entity.CreateDate, "before save");
entity.Save();
Assert.AreEqual(t1, entity.CreateDate, "entity failed after saved");
}
Results:
DateTest : entity failed after saved
expected:<3/28/2006 4:19:32 PM>
but was:<3/28/2006 4:19:32 PM>
Is this a known issue or am I missing something? If I change the test to:
Assert.AreEqual(t1.ToString(), entity.CreateDate.ToString(), "entity failed after saved");
It passes.
Thanks.