From: Michael D. <mik...@us...> - 2004-09-09 21:20:28
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11326/TypesTest Added Files: DateTimeTypeFixture.cs Log Message: Added test for DateTimeType and modified name of Table in hand coded Sql inside of FooBarTest because MySql is case sensitive. --- NEW FILE: DateTimeTypeFixture.cs --- using System; using NHibernate.Type; using NUnit.Framework; namespace NHibernate.Test.TypesTest { /// <summary> /// TestFixtures for the <see cref="DateTimeType"/>. /// </summary> [TestFixture] public class DateTimeTypeFixture { [Test] public void DeepCopyNotNull() { NullableType type = NHibernate.DateTime; object value1 = DateTime.Now; object value2 = type.DeepCopyNotNull(value1); Assert.AreEqual( value1, value2, "Copies should be the same."); Assert.IsFalse( Object.ReferenceEquals(value1, value2), "Should be different objects in memory." ); value2 = ((DateTime)value2).AddHours(2); Assert.IsFalse( value1==value2, "value2 was changed, should not be the same." ); } } } |