Penyedia data menggunakan junit
@RunWith(DataProviderRunner.class)
public class example {
//code
}
Defeated Dolphin
@RunWith(DataProviderRunner.class)
public class example {
//code
}
@DataProvider
public static Object[][] testExampleProvider() {
return new Object[][]{
{"param1", "param2", number1}
{"param1", "param2", number1}
//You can put as many parameters as you want
};
}
@Test
@UseDataProvider("testExampleProvider")
public void testAccount(String param1, String param2, int number) {
//System.out.println("exampleOfDataProviders");
//assertEquals(...);
//assertEquals(...);
}