Hello,
I was going through my project automation suite and while understanding a test I came across this.
@DataProvider(name = "testEmailWorkbookCampaignLaunch")
protected Object[][] testEmailWorkbookCampaignsLaunch(ITestNGMethod method) {
Object[][] params = CommonUtils.getExcelInputDataArray(method,Constants.TEST_DATA_EMAIL_PATH+"EmailTestData.xls","EmailCampaigns", "testEmailWorkbookCampaignLaunch");
return (params);
}
My question what is what is "ITestNGMethod" interface and why it is used??
I read the javadoc but didnt understand.
Thanks,
Subhasish
Instructor
Ashish Thakur Replied on 31/10/2019
Please refer to the code below.
The error was at line number 11, where you had specified YYYY instead of yyyy
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Date_Java {
public static void main(String[] args) throws ParseException {
Date d = new Date();
System.out.println(d.toString());
String mydate = "23/07/2008";
SimpleDateFormat sd = new SimpleDateFormat("dd/MM/yyyy");
Date d1 = sd.parse(mydate);
System.out.println(d1.toString());
System.out.println(d1.compareTo(d));
sd = new SimpleDateFormat("MMMM");
String month = sd.format(d1);
System.out.println(month);
}
}
I did not follow.. The code you asked me to follow does not relate to my query.
I wanted to know :
My question what is what is "ITestNGMethod" interface and why it is used??