Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19224/src/NHibernate.Test/NHSpecificTest
Modified Files:
BasicBinaryFixture.cs BasicObjectFixture.cs
Log Message:
Beginning to isolate the Types so I can figure out what is ADO.NET driver
problems and which are NHibernate problems. NH works great with Ms
Sql 2000, but not so great with MySql & Oracle.
Index: BasicObjectFixture.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicObjectFixture.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BasicObjectFixture.cs 31 Aug 2004 20:37:29 -0000 1.1
--- BasicObjectFixture.cs 31 Aug 2004 21:24:38 -0000 1.2
***************
*** 28,32 ****
/// <summary>
! /// This is the replacement for ParentChildTest.ObjectType()
/// </summary>
[Test]
--- 28,32 ----
/// <summary>
! /// This is the replacement for ParentChildTest.ObjectType() and FooBarTest.ObjectType()
/// </summary>
[Test]
***************
*** 38,46 ****
--- 38,51 ----
any.Name = "the any";
+ IBasicObjectProxy anyProxy = new BasicObjectProxy();
+ anyProxy.Name = "proxied object";
+
BasicObject bo = new BasicObject();
bo.Name = "the object";
bo.Any = any;
+ bo.AnyWithProxy = anyProxy;
s.Save(any);
+ s.Save(anyProxy);
s.Save(bo);
s.Flush();
***************
*** 49,59 ****
s = sessions.OpenSession();
bo = (BasicObject)s.Load( typeof(BasicObject), bo.Id );
Assert.IsNotNull( bo.Any , "any should not be null" );
Assert.IsTrue( bo.Any is BasicObjectRef, "any should have been a BasicObjectRef instance" );
any = (BasicObjectRef)s.Load( typeof(BasicObjectRef), any.Id );
Assert.AreSame( any, bo.Any, "any loaded and ref by BasicObject should be the same" );
! s.Delete(any);
s.Delete(bo);
s.Flush();
--- 54,72 ----
s = sessions.OpenSession();
bo = (BasicObject)s.Load( typeof(BasicObject), bo.Id );
+
+
+ Assert.IsNotNull( bo.AnyWithProxy , "AnyWithProxy should not be null" );
+ Assert.IsTrue( bo.AnyWithProxy is IBasicObjectProxy, "AnyWithProxy should have been a IBasicObjectProxy instance" );
+ Assert.AreEqual( anyProxy.Id, ((IBasicObjectProxy)bo.AnyWithProxy).Id );
+
Assert.IsNotNull( bo.Any , "any should not be null" );
Assert.IsTrue( bo.Any is BasicObjectRef, "any should have been a BasicObjectRef instance" );
+ Assert.AreEqual( any.Id, ((BasicObjectRef)bo.Any).Id );
any = (BasicObjectRef)s.Load( typeof(BasicObjectRef), any.Id );
Assert.AreSame( any, bo.Any, "any loaded and ref by BasicObject should be the same" );
! s.Delete(bo.Any);
! s.Delete(bo.AnyWithProxy);
s.Delete(bo);
s.Flush();
Index: BasicBinaryFixture.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicBinaryFixture.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** BasicBinaryFixture.cs 1 Jul 2004 12:53:14 -0000 1.3
--- BasicBinaryFixture.cs 31 Aug 2004 21:24:38 -0000 1.4
***************
*** 23,26 ****
--- 23,27 ----
}
+
[Test]
public void InsertNull()
***************
*** 106,109 ****
--- 107,111 ----
ISession s = sessions.OpenSession();
+ bcBinary.DefaultSize = System.Text.Encoding.UTF8.GetBytes("ghij1`23%$");
s.Save(bcBinary);
s.Flush();
***************
*** 113,117 ****
bcBinary = (BasicBinary)s.Load(typeof(BasicBinary), 1);
! bcBinary.DefaultSize = GetByteArray(15);
s.Flush();
--- 115,119 ----
bcBinary = (BasicBinary)s.Load(typeof(BasicBinary), 1);
! bcBinary.DefaultSize[1] = (byte)126;
s.Flush();
***************
*** 123,127 ****
// was DefaultSize updated
! ObjectAssertion.AssertEquals( bcBinary.DefaultSize, GetByteArray(15) );
// WithSize should not have been updated
ObjectAssertion.AssertEquals( bcBinary.WithSize, GetByteArray(10) );
--- 125,130 ----
// was DefaultSize updated
! Assert.AreEqual( 10, bcBinary.DefaultSize.Length );
! Assert.AreEqual( 126, bcBinary.DefaultSize[1] );
// WithSize should not have been updated
ObjectAssertion.AssertEquals( bcBinary.WithSize, GetByteArray(10) );
***************
*** 136,140 ****
// was DefaultSize not updated
! ObjectAssertion.AssertEquals( bcBinary.DefaultSize, GetByteArray(15) );
ObjectAssertion.AssertEquals( bcBinary.WithSize, GetByteArray(20) );
--- 139,145 ----
// was DefaultSize not updated
! Assert.AreEqual( 10, bcBinary.DefaultSize.Length );
! Assert.AreEqual( 126, bcBinary.DefaultSize[1] );
!
ObjectAssertion.AssertEquals( bcBinary.WithSize, GetByteArray(20) );
|