From: Scott L. <sl...@sl...> - 2002-04-18 18:40:35
|
On Thu, Apr 18, 2002 at 12:23:57PM +0100, Jeff Martin wrote: > Here you go. Just drop it into ~/.vim/plugin, start up vim, type :call > MockIt("this.is.the.Interface") > > Easy as that. > > Still need to sort out a proper name mapping so you can do > > :mockit this.is.the.Interface > > and it doesn't put in variable names for the method arguments, but I'll > get there. I still say this isn't as good. Even though you don't have to manually type out the interface the first time, - if the interface changes (as in the SQL example), you need to manually sort it out. With the stubs, you don't. - it's more work to catch errors. My stub generator will immediately complain if there are conflicting methods with the same signature. (Or should. It needs more testing.) - the source code is cluttered up with lots of methods that aren't implemented, obscuring what actually does work. -- Scott Lamb |