Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20833/NHibernate.Test/NHSpecificTest
Modified Files:
BasicClassFixture.cs
Log Message:
NH-134
Index: BasicClassFixture.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHSpecificTest/BasicClassFixture.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** BasicClassFixture.cs 22 Sep 2004 21:56:02 -0000 1.7
--- BasicClassFixture.cs 23 Oct 2004 15:01:20 -0000 1.8
***************
*** 21,24 ****
--- 21,49 ----
}
+ /// <summary>
+ /// This is a test for <a href="http://jira.nhibernate.org/browse/NH-134">NH-134</a>.
+ /// </summary>
+ /// <remarks>
+ /// It checks to make sure that NHibernate can use the correct accessor to get the
+ /// type="" attribute through reflection.
+ /// </remarks>
+ [Test]
+ public void TestPrivateFieldAccess()
+ {
+ ISession s = sessions.OpenSession();
+
+ BasicClass bc = new BasicClass();
+ bc.Id = 1;
+ bc.ValueOfPrivateField = 5;
+ s.Save( bc );
+ s.Flush();
+ s.Close();
+
+ s = sessions.OpenSession();
+ bc = (BasicClass)s.Load( typeof(BasicClass), (int)1 );
+ Assert.AreEqual( 5, bc.ValueOfPrivateField, "private field accessor" );
+ s.Close();
+ }
+
[Test]
public void TestCRUD()
|