public void LocalVariableClosureTest() { using (var session = Domain.OpenSession()) using (var tx = session.OpenTransaction()) { var tester = new InheritorValueTypeTester(-1); Domain.QueryCache.Clear(); Assert.That(tester.TestLocalVariable(session, idsPair.Second), Is.EqualTo(16.0m)); Assert.That(tester.TestLocalVariable(session, idsPair.First), Is.EqualTo(6.0m)); Assert.That(Domain.QueryCache.Count, Is.EqualTo(1)); } }