PMFJI, but this sounds suspiciously to me tlike you are testing the framework (useless) vs. testing your code (valuable). You might be better off simply asserting that your *configuration* (mapping) of your target cached entity is what you think it should be rather than asserting that the behavior of the second-level cache is 'as expected'. Not only is this (probably) a simpler unit test to write, but it also more accurately captures your intent (I think).
Obviously I don't know your specific situation so this suggestion might not apply to you, but IMO its at least worth thinking about...you are probably constructing an overly-elaborate 'integration test' in order to be able to assert that the NH 2nd-level cache behaves as you expect it to when (I suspect) what you *really* mean to be testing is whether you have properly configured your entity to be a candidate for 2nd-level caching. Just my 2 cents; feel free to ignore it if inappropriate to your situation :) -Steve B. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/wTHde9D2MXYJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
