Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed some of the .net-2.0 syntax back to be compatible with .net-1…

….1 (specifically, tests for NH-901 and NH-995)

SVN: branches/1.2.x@3096
  • Loading branch information...
commit 7134482060213c22603a9a12369676c74d3132da 1 parent 33ee042
Karl Chu authored
View
10 src/NHibernate.Test/NHSpecificTest/NH901/Fixture.cs
@@ -1,9 +1,5 @@
using NUnit.Framework;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
namespace NHibernate.Test.NHSpecificTest.NH901
{
[TestFixture]
@@ -46,7 +42,7 @@ public void EmptyValueTypeComponent()
using (ISession s = OpenSession(interceptor))
using (ITransaction tx = s.BeginTransaction())
{
- Person jimmy = s.Get<Person>("Jimmy Hendrix");
+ Person jimmy = (Person)s.Get(typeof(Person), "Jimmy Hendrix");
interceptor.entityToCheck = jimmy;
tx.Commit();
}
@@ -56,7 +52,7 @@ public void EmptyValueTypeComponent()
using (ISession s = OpenSession(interceptor2))
using (ITransaction tx = s.BeginTransaction())
{
- Person jimmy = s.Get<Person>("Jimmy Hendrix");
+ Person jimmy = (Person)s.Get(typeof(Person), "Jimmy Hendrix");
jimmy.Address = new Address();
interceptor.entityToCheck = jimmy;
tx.Commit();
@@ -84,7 +80,7 @@ public void ReplaceValueTypeComponentWithSameValueDoesNotMakeItDirty()
using (ISession s = OpenSession(interceptor))
using (ITransaction tx = s.BeginTransaction())
{
- Person jimmy = s.Get<Person>("Jimmy Hendrix");
+ Person jimmy = (Person)s.Get(typeof(Person), "Jimmy Hendrix");
interceptor.entityToCheck = jimmy;
Address a = new Address();
View
10 src/NHibernate.Test/NHSpecificTest/NH995/Fixture.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH995
@@ -63,10 +63,10 @@ public void Test()
using (ITransaction tx = s.BeginTransaction())
{
// Load a so we can use it to load b
- ClassA a = s.Get<ClassA>(a_id);
+ ClassA a = (ClassA)s.Get(typeof(ClassA), a_id);
// Load b so b will be in cache
- ClassB b = s.Get<ClassB>(new ClassBId("bbb", a));
+ s.Get(typeof(ClassB), new ClassBId("bbb", a));
tx.Commit();
}
@@ -76,9 +76,9 @@ public void Test()
{
using (SqlLogSpy sqlLogSpy = new SqlLogSpy())
{
- IList<ClassC> c_list = s.CreateCriteria(typeof (ClassC)).List<ClassC>();
+ IList c_list = s.CreateCriteria(typeof (ClassC)).List();
// make sure we initialize B
- NHibernateUtil.Initialize(c_list[0].B);
+ NHibernateUtil.Initialize(((ClassC)c_list[0]).B);
Assert.AreEqual(1, sqlLogSpy.Appender.GetEvents().Length,
"Only one SQL should have been issued");
Please sign in to comment.
Something went wrong with that request. Please try again.