Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13841
Modified Files:
FooBarTest.cs
Log Message:
added test to verify one-to-one was working with null on one end.
Index: FooBarTest.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** FooBarTest.cs 8 Nov 2004 02:55:39 -0000 1.71
--- FooBarTest.cs 17 Nov 2004 02:32:13 -0000 1.72
***************
*** 428,431 ****
--- 428,445 ----
s.Flush();
s.Close();
+
+ // check to see if Y can exist without a X
+ y = new Y();
+ s = sessions.OpenSession();
+ s.Save( y );
+ s.Flush();
+ s.Close();
+
+ s = sessions.OpenSession();
+ y = (Y)s.Load( typeof(Y), y.Id );
+ Assert.IsNull( y.X, "y does not need an X" );
+ s.Delete( y );
+ s.Flush();
+ s.Close()
}
|