MonoRail: Testing, Route Extensions, Folder Structures

Posted by Kezzer on Stack Overflow See other posts from Stack Overflow or by Kezzer
Published on 2010-04-29T10:41:32Z Indexed on 2010/04/29 10:47 UTC
Read the original article Hit count: 441

Filed under:
|

I've got a few questions related to the use of MonoRail

Testing

Does everyone tend to use NUnit for their testing? I haven't worked enough with testing to know if this is a good testing framework to use. I'm just looking to get more into testing my applications a lot more than before and wanted to know if there's any general guidelines.

Are you supposed to copy the controller over to a test area and just rename it with test in the name and re-run it? How do you ensure your test project and main project coincide with one another? Is it just a case of copying everything over again or are there tools available to do it for you?

Route Extensions

MonoRail tends to use <action>.rails, can you omit the .rails part if you configure your routing correctly? Why does this seem to be the standard?

Folder Structures

I haven't found anywhere which really points out your standard folder structure. Sure, you have Controllers, Models, and Views. But your Models folder should contain your data access objects as well. I've seen some have something like

-> Models
   -> DaoClasses
   -> Entities

But what about custom structures used to get data out of views? And if you're using NHibernate, where's a good place to stick the mappings? I know it's entirely dependent on the developer, but I haven't really seen any standard approach.

Cheers

© Stack Overflow or respective owner

Related posts about monorail

Related posts about nhibernate