-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ITestListener - Add unimplemeted methods missing in eclipse for #1964
Comments
@sen1983 - TestNG 7.0.0 uses JDK8 and with it default methods within interfaces. What this means is that every listener would now have a default implementation (which doesn't do anything ) for all methods defined within the interface. So now you won't see those indications from the IDE. The biggest benefit of default methods in interfaces is that let's say you are implementing an interface that has 10 methods defined in it, you can just implement whatever you need and the rest of the behavior comes via the default methods in the interface. |
@krmahadevan - Thank you for the answer, adding more info to it. When you are not able to add the unimplemented methods, start writing the code but do not add "@OverRide". |
@sagaramritkar - Not sure what do you mean and what you were trying to explain. Care to explain one more time ? |
@sagaramritkar Agreed with your statement when I am adding the default method [ default void onTestFailure(ITestResult result) { @krmahadevan Please verify |
This issue belongs to TestNG 7.1.0. try to configure TestNG 6.14.3. Issue will not reproduce. |
is this an issue or change ? |
@prernabhandari2427 - Not sure what you mean by that. |
Thanks, it works |
@pranayKumarPK |
TestNG Version - 7.0.0-beta1
Expected behavior
When the ITestListener or any other listener gets implemented eclipse should show add unimplemented methods option, when clicked on the option all the methods of the interface should included the class
Actual behavior
Its not working as expected behavior
Is the issue reproductible on runner?
Test case sample
package com.freecrm.ExtentReportListener;
import org.testng.ITestListener;
public class MyListener implements ITestListener{
}
The text was updated successfully, but these errors were encountered: