From: Paul H. <pha...@us...> - 2005-03-14 18:56:25
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7707/nhibernate/src/NHibernate.Test Modified Files: FooBarTest.cs MultiTableTest.cs Log Message: Refactored as per 2.1 Index: FooBarTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/FooBarTest.cs,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** FooBarTest.cs 6 Mar 2005 12:44:34 -0000 1.85 --- FooBarTest.cs 14 Mar 2005 18:56:13 -0000 1.86 *************** *** 1173,1176 **** --- 1173,1177 ---- s = sessions.OpenSession(); baz = (Baz) ( (object[])s.Find("select baz, baz from baz in class NHibernate.DomainModel.Baz")[0] )[1]; + Assert.AreEqual( 1, baz.CascadingBars.Count, "baz.CascadingBars.Count" ); Foo foo = new Foo(); s.Save(foo); *************** *** 1179,1188 **** baz.FooArray = new Foo[] { foo, foo, null, foo2 } ; baz.FooSet.Add(foo ); ! baz.Customs.Add( new string[] {"new", "custom"} ); baz.StringArray = null; baz.StringList[0] = "new value"; baz.StringSet = new Iesi.Collections.HashedSet(); ! Assert.AreEqual( 1, baz.StringGlarchMap.Count ); IList list; --- 1180,1191 ---- baz.FooArray = new Foo[] { foo, foo, null, foo2 } ; baz.FooSet.Add(foo ); ! baz.Customs.Add( new string[] { "new", "custom" } ); baz.StringArray = null; baz.StringList[0] = "new value"; baz.StringSet = new Iesi.Collections.HashedSet(); ! // HACK: 2.1 - The java (and old NH) version has the result of this as 1, I can't see why it should be since we explicitly put 2 items into StringGlarchMap? ! //Assert.AreEqual( 2, baz.StringGlarchMap.Count, "baz.StringGlarchMap.Count" ); ! Assert.AreEqual( 1, baz.StringGlarchMap.Count, "baz.StringGlarchMap.Count" ); IList list; *************** *** 1360,1364 **** } ! Assert.AreEqual( 1, s.Delete("from g in class Glarch") ); s.Flush(); s.Disconnect(); --- 1363,1367 ---- } ! Assert.AreEqual( 1, s.Delete("from g in class Glarch"), "Delete('from g in class Glarch')" ); s.Flush(); s.Disconnect(); Index: MultiTableTest.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/MultiTableTest.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MultiTableTest.cs 28 Nov 2004 03:13:43 -0000 1.7 --- MultiTableTest.cs 14 Mar 2005 18:56:13 -0000 1.8 *************** *** 248,252 **** simp = (Simple)s.Load( typeof(Simple), sid ); Assert.IsFalse( simp is Multi ); ! Assert.IsTrue( multi is Multi ); Assert.AreEqual( "extra23", multi.ExtraProp ); Assert.AreEqual( "newer name", multi.Name ); --- 248,253 ---- simp = (Simple)s.Load( typeof(Simple), sid ); Assert.IsFalse( simp is Multi ); ! // Can't see the point of this test since the variable is declared as Multi! ! //Assert.IsTrue( multi is Multi ); Assert.AreEqual( "extra23", multi.ExtraProp ); Assert.AreEqual( "newer name", multi.Name ); *************** *** 364,368 **** simp = (Simple)s.Load( typeof(Simple), simpId ); Assert.IsFalse( simp is Multi ); ! Assert.IsTrue( multi is Multi ); Assert.AreEqual( "extra23", multi.ExtraProp ); Assert.AreEqual( "newer name", multi.Name ); --- 365,370 ---- simp = (Simple)s.Load( typeof(Simple), simpId ); Assert.IsFalse( simp is Multi ); ! // Can't see the point of this test since the variable is declared as Multi! ! //Assert.IsTrue( multi is Multi ); Assert.AreEqual( "extra23", multi.ExtraProp ); Assert.AreEqual( "newer name", multi.Name ); |