Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Warning: Any ignored/dropped User Defined Function or User Defined Function Providers
  • Error: Errors loading User Defined Function Providers or initializing User Defined Functions
  • Info: User Defined Function Loaded
  • SDE: No User Defined function class with specified name/namespace found

Testing

ServiceLoader APIProvider ClassFunction ClassEvaluate function
Primitive Arg/Return Types TestingBoxed Args/Return Type TestingOther Param/Return Types
FocusIDDescriptionTest Data
1Tests when there are no providers found by the ServiceLoader API due to missing or empty meta-inf fileNo META-INF /Services/org.apache.daffodil.udf.UDFunctionProvider file on classpath of classLoader (CLI Test)
2Tests when there is an error thrown from ServiceLoader APIMETA-INF /Services/org.apache.daffodil.udf.UDFunctionProvider file contains typo in class nameclass that doesn’t exit
3Tests when UDF Provider has no function classesUDF with no call to setFunctionClasses initializing functionClasses to array of classesUDFP whose getUDF func returns null
4Tests when UDF Provider has empty function classUDF with call to setFunctionClasses initializing functionClasses to UDFP whose getUDF func returns empty array of classes
56Tests when function classes don’t implement UserDefinedFunction interfaceUDF with function class that doesn’t implement UserDefinedFunction interface
76Tests when function classes don’t have annotationsUDF with function class that doesn’t have UserDefinedFunctionIdentification annotation
87Tests when function classes have empty/invalid annotation fieldsUDF with function class that has annotation function with empty fields
98Tests when function classes have no evaluate functionUDF with function class whose method isn’t named “evaluate”doesn’t have method called evaluate
910Tests when function can’t be foundFunction call from schema with no non either non existent namespace or namematching UDF loaded
1011Tests when function class have overloaded evaluate functionUDF with overloaded evaluate function
1211Tests when arguments number incorrectFunction call from schema with incorrect arg number
1312Tests when argument types incorrectFunction call from schema with incorrect arg type
1413Tests when argument types unsupportedFunction call from schema with unsupported type (such as CalendarArray of String)
1514Tests when return type unsupportedUDF with unsupported return type such as Array of Arrays
1615Tests UDF with no argsUDF with no param and static return typeparams
1617Tests UDF with no return typeUDF with void return type
17Tests UDF with primitive int params and returnsUDF with primitive params and return
18Tests UDF with primitive int byte params and returnsUDF with primitive params and return
19Tests UDF with primitive byte array params and returnsUDF with primitive params and return
20Tests UDF with primitive short params and returnsUDF with primitive params and return
21Tests UDF with primitive long params and returnsUDF with primitive params and return
22Tests UDF with primitive double params and returnsUDF with primitive params and return
23Tests UDF with primitive float params and returnsUDF with primitive params and return
24Tests UDF with primitive boolean params and returnsUDF with primitive params and return
25Tests UDF with Boxed Integer params and returnsUDF with boxed params and return
26Tests UDF with Boxed Byte params and returnsUDF with boxed params and return
27Tests UDF with Boxed Short params and returnsUDF with boxed params and return
28Tests UDF with Boxed Long params and returnsUDF with boxed params and return
29Tests UDF with Boxed Double params and returnsUDF with boxed params and return
30Tests UDF with Boxed Float params and returnsUDF with boxed params and return
31Tests UDF with Boxed Boolean params and returnsUDF with boxed params and return
32Tests UDF with Java Big Integer params and returnsUDF with specified params and returns
33Tests UDF with Java Big Decimal params and returnsUDF with specified params and returns
34Tests UDF with String params and returnsUDF with specified params and returns
35Tests UDF with Byte Array params and returnswhen no UDFs called, and no UDFs available to be loadedNo UDFs on classpath, no UDF in schema
36Tests when UDFs called, but no UDFs loadedNo UDFs on classpath, UDF in schema
37Tests when UDF called with default namespaceDefault namespace set to UDF namespaceURI; UDF calls with no prefix
38Tests when exceptions thrown during loading UDFPUDFP classes throws exception in class
39Tests when exceptions thrown during loading UDFP’s UDF classesUDFP throws exception in getUDFs function
40Tests when exceptions thrown during loading UDFUDF throws exception in class
41Tests when custom exceptions thrown during evaluating (FatalError)UDF throws exception in evaluate function
42Tests when UDFProcessingError thrown during evaluating (ProcessingError)UDF throws UDFProcessingError in evaluate function
43Tests when UDF initializer returns object of wrong typeUDFP’s initialization function creates UDF object of different typeUDF with specified params and returns36Tests UDF with URI params and returnsUDF with specified params and returns

Prototype

UDF Jars: HAEMSLConversions.jar and UDFunctionProviderImpl.jar. Both extend UDFunctionProvider.jar.

...