I have encountered an issue with Oracle SQL Developer (4.0.2.15) that I need help with writing unit tests for my stored procedures. An example of the procedure is as follows:
PROCEDURE p_example (i_someinput NUMBER, o_cursor REF CURSOR)
AS
BEGIN
OPEN o_cursor FOR
SELECT 1 seqno, t type , example description FROM example_table;
END;
In my unit test I set up the row in the database, I have my rollback and I use the dynamic query to define the input and what I expect to come out of the ref cursor.
Example of Dynamic query:
SELECT inputval i_someinput, CURSOR(SELECT 1 seqno, t type, example description FROM dual) o_cursor$ FROM dual;
My issue is that when running the test it fails and I then have to do comparisons between the expected result and the actual result.
When comparing I realise I have to pad some of the columns so that they will line up correctly and once this is done, the test passes successfully.
It would appear that the actual result and the expected result are being compared as a string, rather than comparing the contents of the cursors
I was just wondering if anybody had a resolution for this or is it a known issue with SQL developer.
Thanks
Subboss