Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14895/NHibernate.Test/NHSpecificTest
Modified Files:
BasicClassFixture.cs
Log Message:
Fix and test fixture for NH-52
Index: BasicClassFixture.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** BasicClassFixture.cs 20 Sep 2004 17:46:00 -0000 1.6
--- BasicClassFixture.cs 22 Sep 2004 21:56:02 -0000 1.7
***************
*** 749,752 ****
--- 749,778 ----
}
+ [Test]
+ public void TestWrapArrayInListProperty()
+ {
+
+ ISession s = sessions.OpenSession();
+ BasicClass bc = new BasicClass();
+
+ int id = 1;
+
+ bc.StringList = new string[] { "one", "two" };
+
+ s.Save( bc, id );
+ s.Flush();
+ s.Close();
+
+ s = sessions.OpenSession();
+ bc = (BasicClass)s.Load( typeof(BasicClass), id );
+
+ Assert.AreEqual( 2, bc.StringList.Count, "should have saved to StringList from an array" );
+ Assert.IsTrue( bc.StringList.Contains( "one" ), "'one' should be in there" );
+ Assert.IsTrue( bc.StringList.Contains( "two" ), "'two' should be in there" );
+
+ s.Delete( bc );
+ s.Flush();
+ s.Close();
+ }
internal void AssertDelete(int id)
|