Allow users to access factory method params info #885
Annotations
3 errors and 3 warnings
Test:
testng-core-api\src\main\java\org\testng\IParameterInfo.java#L1
Replace 36 lines 1..36 with
package org.testng;
/** Represents the ability to retrieve the parameters associated with a factory method. */
public interface IParameterInfo {
/** @return - The actual instance associated with a factory method */
Object getInstance();
/**
* @return - The actual index of instance associated with a factory method. This index has a 1:1
* correspondence with what were specified via the <code>indices</code> attribute of the
* <code>@factory</code> annotation. For e.g., lets say you specified the indices to the "1"
* and your factory returned 4 instances, then the instance on which this method is invoked
* would have the value as "1".
*/
int getIndex();
/**
* @return - returns an index which indicates the running position in the array of test class
* instances that were produced by a <code>@factory</code> annotated constructor or static
...16 more lines
|
Test:
task ':testng-core-api:autostyleJavaCheck'#L1
Execution failed for task ':testng-core-api:autostyleJavaCheck':
See 'What went wrong' below
|
Test
Execution failed for task ':testng-core-api:autostyleJavaCheck'.
> The following files have format violations:
src\main\java\org\testng\IParameterInfo.java
@@ -1,36 +1,36 @@
-package org.testng;\r\n
-\r\n
-/** Represents the ability to retrieve the parameters associated with a factory method. */\r\n
-public interface IParameterInfo {\r\n
-\r\n
- /** @return - The actual instance associated with a factory method */\r\n
- Object getInstance();\r\n
-\r\n
- /**\r\n
- * @return - The actual index of instance associated with a factory method. This index has a 1:1\r\n
- * correspondence with what were specified via the <code>indices</code> attribute of the\r\n
- * <code>@factory</code> annotation. For e.g., lets say you specified the\r\n
- * indices to the "1" and your factory returned 4 instances, then the instance on which this\r\n
- * method is invoked would have the value as "1".\r\n
- */\r\n
- int getIndex();\r\n
-\r\n
- /**\r\n
- * @return - returns an index which indicates the running position in the array of test class\r\n
- * instances that were produced by a <code>@factory</code> annotated constructor or static\r\n
- * method. For e.g., lets say your <code>@factory</code> method returned 4 instances, then\r\n
- * each of the invocations to this method would return a value from <code>0</code> to <code>3\r\n
- * </code>\r\n
- */\r\n
- int currentIndex();\r\n
-\r\n
- /** @return - The parameters associated with the factory method as an array. */\r\n
- Object[] getParameters();\r\n
-\r\n
- static Object embeddedInstance(Object original) {\r\n
- if (original instanceof IParameterInfo) {\r\n
- return ((IParameterInfo) original).getInstance();\r\n
- }\r\n
- return original;\r\n
- }\r\n
-}\r\n
+package org.testng;\n
+\n
+/** Represents the ability to retrieve the parameters associated with a factory method. */\n
+public interface IParameterInfo {\n
+\n
+ /** @return - The actual instance associated with a factory method */\n
+ Object getInstance();\n
+\n
+ /**\n
+ * @return - The actual index of instance associated with a factory method. This index has a 1:1\n
+ * correspondence with what were specified via the <code>indices</code> attribute of the\n
+ * <code>@factory</code> annotation. For e.g., lets say you specified the indices to the "1"\n
... (24 more lines that didn't fit)
You might want to adjust -PmaxCheckMessageLines=50
-PmaxFilesToList=10
-PminLinesPerFile=4
to see more violations
Run './gradlew autostyleApply' to fix the violations.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: burrunan/gradle-cache-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test
Gradle Build Scan: https://gradle.com/s/qski67iatrj5s
|
Upload build reports
No files were found with the provided path: testng-core/build/reports/tests/test/**. No artifacts will be uploaded.
|
Loading