Databases Reference
In-Depth Information
Finally add a third action to return the duration . The completed body of our function
looks as shown in the following screenshot:
To implement our leaveDuration function, we follow the same approach (for
details of this, see the code samples included with the topic).
Testing a function
JDeveloper provides a test option that allows us to run a function in JDeveloper
without the need to deploy it first. However, it will only allow us to run functions
with no input parameters and returns a type of boolean .
In order to test our startsIn function, we need to write a wrapper function (for
example, testStartsIn ) which creates the required input parameters for our function,
invokes it, and then prints out the result. So the body of our test function will look as
shown in the following screenshot:
To run this, with the Functions tab, select the testStartsIn function, and click the Test
button, as shown in the following screenshot:
If there are any validation errors within our rules dictionary, then the Test
button will be disabled.
 
Search WWH ::




Custom Search