-
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
Support params in Factory in ITestResult #1911
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't catch why you use IParameterInfo.embeddedInstance everywhere instead of directly dealing with IParameterInfo.
@@ -211,4 +211,8 @@ | |||
default boolean isDataDriven() { | |||
return false; | |||
} | |||
|
|||
default Object getRawInstance() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe some javadoc is missing. What's the difference between raw instance and instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed this for better readability
@@ -715,4 +724,8 @@ public ConstructorOrMethod getConstructorOrMethod() { | |||
public String getQualifiedName() { | |||
return getRealClass().getName() + "." + getMethodName(); | |||
} | |||
|
|||
public Object getRawInstance() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Override
is missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -34,7 +34,7 @@ | |||
|
|||
private static final String PREFIX = "[TestNGClassFinder]"; | |||
private final ITestContext m_testContext; | |||
private final Map<Class<?>, List<Object>> m_instanceMap = Maps.newHashMap(); | |||
private final Map<Class<?>, List<Object>> m_instanceMap = Maps.newHashMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
The reason behind doing that is because a user has the ability to retrieve the The other option for this would be to deprecate the |
43f3104
to
2f424eb
Compare
* @return - A {@link IParameterInfo} object that represents details about the parameters | ||
* associated with the factory method. | ||
*/ | ||
default IParameterInfo getFactoryMethodParamsInfo() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not have the method on a IFactoryMethod which extends ITestNGMethod?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will need a bit more involved changes. I will take it up later in a separate PR once I am back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, create an issue as reminder
2f424eb
to
45ffea3
Compare
Merging this PR since @juherr has approved it. |
Closes #1041
Fixes #1041 .
Did you remember to?
CHANGES.txt
We encourage pull requests that:
If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.