Hi Niels, 
Take a look at this file:

https://github.com/cgivre/drill/blob/67804e9d8a4634df8dbf60e848533a62d64dee64/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNetworkFunctions.java
 
<https://github.com/cgivre/drill/blob/67804e9d8a4634df8dbf60e848533a62d64dee64/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNetworkFunctions.java>

This should be a pretty good template for unit tests for a function.
— C

> On Jan 22, 2018, at 10:01, Niels Basjes <[email protected]> wrote:
> 
> Hi,
> 
> I was reading through the tutorial page on how to write a custom function
> for Drill and I've alos looked at some functions I found on the internet.
> 
> There is one thing I would really like to know that I have not yet found so
> far: How do I unut test if I did it right?
> 
> Especially the effects of the various annotations and the fact that you
> need to specify all classes "fully" without an import.
> 
> -- 
> Best regards / Met vriendelijke groeten,
> 
> Niels Basjes

Reply via email to