Creating method templates in Eclipse

Posted by stevebot on Stack Overflow See other posts from Stack Overflow or by stevebot
Published on 2010-06-10T00:22:48Z Indexed on 2010/06/10 0:32 UTC
Read the original article Hit count: 349

Is there any way to do the following in eclipse?

Have eclipse template a method like the following

public void test(){

// CREATE MOCKS

// CREATE EXPECTATIONS

// REPLAY MOCKS

// VERIFY MOCKS

}

so then I could presumably just use intellisense and select an option like "createtest" and have it stub out a method with the comments similar to the above?My problem is that often myself and other developers I know forgot all the steps we need to follow to do what we dub as a valid unit test for our application. If I could template our test methods to stub out the comments above it would be a big help.

© Stack Overflow or respective owner

Related posts about java

Related posts about eclipse