well my intent is to verify that my entities have been correctly
mapped to utilize caching, however the only way I can think of
implementing such a test is by creating/modifying my entity and
checking the framework to see if the expected event has been triggered
by the cache. If you have a better way of accomplishing this task I am
open to it.

On Jul 4, 7:06 am, sbohlen <[email protected]> wrote:
> 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 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.

Reply via email to