Re: Unit Testing Model-View-Presenter
- From: "Steven Nagy" <learndotnet@xxxxxxxxxxx>
- Date: 5 Oct 2006 00:33:47 -0700
I am using TDD, along with mock views attached to the View interface to
attempt to unit test the UI. The problem I am having is when using the
InitView() of the presenter, normally I would be retrieving data from
NHibernate when InitView is called.
I thought that in fact your Model would be dealing with nHibernate?
Which means you would need to Mock it as well. And in your case, a call
to the Mocked model object should return an object that has been
constructed from nHibernate.
Therein lies the problem, I can't seem to figure out how to properly
attach to the presenters from my unittest code, and then call InitView
without my production presenters actually connecting to the DB and
retirieving data.
Have you got a high level example?
Could be I am not exactly understanding the approach...
SN
.
- Follow-Ups:
- Re: Unit Testing Model-View-Presenter
- From: Sean Chambers
- Re: Unit Testing Model-View-Presenter
- References:
- Unit Testing Model-View-Presenter
- From: Sean Chambers
- Unit Testing Model-View-Presenter
- Prev by Date: Re: decompression problem
- Next by Date: Re: Is there a clean way to create a byte[] from an HttpWebRequest.Read?
- Previous by thread: Re: Unit Testing Model-View-Presenter
- Next by thread: Re: Unit Testing Model-View-Presenter
- Index(es):
Relevant Pages
|