Testing controller logic that uses ISession directly

Posted by Rippo on Programmers See other posts from Programmers or by Rippo
Published on 2012-09-14T12:47:51Z Indexed on 2012/09/14 15:48 UTC
Read the original article Hit count: 231

I have just read this blog post from Jimmy Bogard and was drawn to this comment.

Where this falls down is when a component doesn’t support a given layering/architecture. But even with NHibernate, I just use the ISession directly in the controller action these days. Why make things complicated?

I then commented on the post and ask this question:-

my question to jimmy

My question here is what options would you have testing the controller logic IF you do not mock out the NHibernate ISession.

I am curious what options we have if we utilise the ISession directly on the controller?

© Programmers or respective owner

Related posts about testing

Related posts about project-structure