Does anybody know how to insert a "@RunWith anotation" above the class signature, using eclipse templates?
Ex.:
@RunWith(Parameterized.class)
public class MyClassTest {
...
@Parameters
public static Collection<Object[]> parameters() {
List<Object[]> list = new ArrayList<Object[]>();
list.add(new Object[] { "mind!", "find!" });
list.add(new Object[] { "misunderstood", "understood" });
return list;
}
...
}
__
Template:
// TODO: move this '@RunWith(Parameterized.class)' to class anotation
@Parameters
public static Collection<Object[]> parameters() {
${type:elemType(collection)}<Object[]> parametersList = new ${type:elemType(collection)}<Object[]>();
${cursor}// TODO: populate collection
return parametersList;
}
__ Thanks for the help!