I tend to be with Dan on this one, mainly because setting up unit tests involving an MG event is such a pain. I'm not near a "real" computer right now, so I cannot state with accuracy how easy it would be to use mocks to test a controller. Creating the mocks would be simple, but getting them into the controller method might not be.
I'll take a look at this next week, and provide an example if it's something I can do relatively easily. Good question! Cheers, Bob On Friday, June 11, 2010, Dan Wilson <[email protected]> wrote: > I normally unit test my model components. I don't test the controller layer, > because really, the controller layer is in charge of pulling in the user > input, calling the model and determining application flow. > > > None of this really is unit test friendly. > > DW > > On Fri, Jun 11, 2010 at 5:03 PM, David J Henry > <[email protected]> wrote: > I'm having some trouble wrapping my head around how to make mxunit > test cases for my ModelGlue controllers. Right now I'm stuck on how > do I fake the event object. Any suggestions? > TIA, > David > > -- > Model-Glue Sites: > Home Page: http://www.model-glue.com > Documentation: http://docs.model-glue.com > Bug Tracker: http://bugs.model-glue.com > Blog: http://www.model-glue.com/blog > > You received this message because you are subscribed to the Google > Groups "model-glue" 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/model-glue?hl=en > > -- > William Osler - "We are here to add what we can to life, not to get what we > can from life." > > > > > -- > Model-Glue Sites: > Home Page: http://www.model-glue.com > Documentation: http://docs.model-glue.com > Bug Tracker: http://bugs.model-glue.com > Blog: http://www.model-glue.com/blog > > You received this message because you are subscribed to the Google > Groups "model-glue" 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/model-glue?hl=en -- Bob Silverberg www.silverwareconsulting.com Hands-on ColdFusion ORM Training www.ColdFusionOrmTraining.com -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" 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/model-glue?hl=en
