-
Notifications
You must be signed in to change notification settings - Fork 164
Eclipse Template
Anthony Attwood edited this page Dec 17, 2015
·
4 revisions
You can add this template to Eclipse by open its preferences and go to Java -> Editor -> Templates
. Click New...
on the right side and enter the following:
- Name: dataProvider
- Context: Java type members
- Automatically insert: false
- Description: Insert a junit dataprovider method
- Use code formatter: false (unfortunately, this is a global setting for all templates)
- Pattern:
@${dataProviderType:newType(com.tngtech.java.junit.dataprovider.DataProvider)}
public static Object[][] dataProvider${Name}() {
// @formatter:off
return new Object[][] {
{ ${cursor} },
};
// @formatter:on
}
- Home
- Motivation, Distinction and FAQs
- Getting started
- Version compatibility
- Migration guides
-
Features
- Array syntax
- String syntax
- Iterable syntax
- Custom dataprovider method resolvers
- Change
@DataProvider
location - Varargs support
@BeforeClass
support (JUnit4 only)- Customize test method name
- Access
FrameworkMethod
in@DP
- Utility methods
- Convention over configuration
- Kotlin support
- OSGi compatible
MANIFEST.MF
- Tips and Tricks
- Release Notes
- Eclipse Template