Hi,
I am using VS2005 (.net 2.0), and I am having a problem debugging into an NUnit test that is working with Proxies.
If I have the following code:
NHibernateWrapper wrapper;
ISession session;
wrapper = NHibernateAccessor.CurrentWrapper;
session = wrapper.ActiveSession;
District d = (District)session.Load(typeof(District), 1);
Assert.AreEqual("Bundaberg",d.DistrictName);
Put a breakpoint on the Assert.AreEqual line, and then attempt to F10 Step-Over the line, the NUnit GUI show the test as failed (text in the status bar but no red or green bar), and the IDE sits there in a ready state but without any ability to coninue stepping through code or investigate.
It seems to fall over because d is still a proxy at that point.
Note if I set a Breakpoint to somewhere after this Assert line (eg after the real object has been loaded, everythig is fine.)
Has anyone else had this issue?
Cheers,
Adam.
|