File structure for stubs & mocks
Moderator: General Moderators
File structure for stubs & mocks
I was wondering what other people used in terms of file structure for storing stubs? Thanks ( short post ) I'm at a loss
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: File structure for stubs & mocks
If they're generated (?) then don't store them in a separate file. If they're use-once but hand-coded, just put them above your test case, in the same file. If they're for repeated use across several tests, place them in your tests directory, under the same naming conventions as your tests.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: File structure for stubs & mocks
Creating stubs is probably the biggest detriment to my unit testing as much as I would personally like too...
I started re-designing/re-factoring my framework/application and have so far successuflly moved to a completely IoC architecture. The complex views are what have me scared as the interface looks so slick when partials were injected into each other at construction time.
The complex view resembled something of a DSL for advanced view creation -- which is not likely using DI...
I started re-designing/re-factoring my framework/application and have so far successuflly moved to a completely IoC architecture. The complex views are what have me scared as the interface looks so slick when partials were injected into each other at construction time.
The complex view resembled something of a DSL for advanced view creation -- which is not likely using DI...
Re: File structure for stubs & mocks
Code: Select all
./mocks/