public void InheritedValuePropertyClosureTest() { using (var session = Domain.OpenSession()) using (var tx = session.OpenTransaction()) { var first = new InheritorValueTypeTester(idsPair.First) { PublicProperty = idsPair.First }; var second = new InheritorValueTypeTester(idsPair.Second) { PublicProperty = idsPair.Second }; Domain.QueryCache.Clear(); var firstResult = first.TestInheritedPublicProperty(session); var secondResult = second.TestInheritedPublicProperty(session); Assert.That(firstResult, Is.EqualTo(6.0m)); Assert.That(secondResult, Is.EqualTo(16.0m)); Assert.That(Domain.QueryCache.Count, Is.EqualTo(1)); } }