S
Sean Chambers
Hello,
I am attempting to utilize the MVP pattern in a new app I am building.
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.
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.
For the time being i created dummy Initilizers, i.e., I have InitView()
that will be used in production asp.net frontend, and am using
InitViewTest() in my unit tests.
For this project I am not using any DAO classes, as it is a small app
that I don't see needing to scale much.
When you are using MVP along with Unit Tests is it in your best
interest to create a set of DAO generic classes for dataaccess via
NHibernate and then subclassing them with the actualy DAO objects like
I read in the NHibernate Best Practices tutorial?
That route just seems like overkill for me, as this app isnt that
large. Any help would be greatly appreciated!
thank you!
Sean
I am attempting to utilize the MVP pattern in a new app I am building.
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.
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.
For the time being i created dummy Initilizers, i.e., I have InitView()
that will be used in production asp.net frontend, and am using
InitViewTest() in my unit tests.
For this project I am not using any DAO classes, as it is a small app
that I don't see needing to scale much.
When you are using MVP along with Unit Tests is it in your best
interest to create a set of DAO generic classes for dataaccess via
NHibernate and then subclassing them with the actualy DAO objects like
I read in the NHibernate Best Practices tutorial?
That route just seems like overkill for me, as this app isnt that
large. Any help would be greatly appreciated!
thank you!
Sean