Tuesday, September 12, 2006

IntelliJ live templates

I know, I know a lot of other people have done this; but I am continually working in IntelliJ and keep losing the live templates I write, so whenever, I need one, I will just update this post.

JUnit test


public void test$METHOD_TO_TEST$() throws Exception {
$END$
}


JUnit test (fail condition)

public void test$METHOD_TO_TEST$() throws Exception {
try {
$FAIL_CONDITION$
fail();
}
catch ($EXCEPTION$ $EXCEPTION_ABBREVIATION$)
{ }
}

No comments: