1 package test.dataprovider; 2 3 import org.testng.annotations.DataProvider; 4 import org.testng.annotations.Test; 5 6 7 /** 8 * Test that if a class @Test is used, the @DataProvider 9 * method won't be considered as a test. 10 */ 11 @Test 12 public class DataProviderAsTest { 13 f()14 public void f() { 15 } 16 17 @DataProvider dataProvider()18 public Object[][] dataProvider() { 19 throw new RuntimeException(); 20 } 21 22 } 23