1 Reply Latest reply: Mar 28, 2014 4:09 PM by rp0428 RSS

    error while performing unit tet of a function

    3050d5ea-07a7-4d00-ba74-013e3b861a69

      Hi,

       

      I have created a function, and trying to perform unit test for the function.

      But while executing the ut, getting "

      • Error(29,1): PLS-00201: identifier 'UTASSERT.ISNULL' must be declared
      • Error(29,1): PLS-00201: identifier 'UTASSERT.ISNULL' must be declared "

      Below is my test cases :

       

      Function :

      CREATE OR REPLACE FUNCTION str_test (

         string_in IN VARCHAR2,

         start_in IN INTEGER,

         end_in IN INTEGER

         )

         RETURN VARCHAR2

      IS

      BEGIN

         RETURN (

            SUBSTR (string_in,start_in,(end_in - start_in) + 1

               )

            );

      END;

       

      UT Package :

      create or replace package body ut_str_test

      IS

      procedure ut_setup

      Is

      begin

      null;

      end ut_setup;

       

       

      procedure ut_teardown

      IS

      begin

      null;

      end ut_teardown;

       

       

      procedure ut_str_test

      IS

      begin

      utAssert.eq(

                 'Valid output',

                  str_test(

                        string_in => 'asish'

                        ,

                        start_in => 1

                        ,

                        end_in = 3

                        ),

                        'asi'

                  );

      utAssert.isNull(

                     'Null Result',

                     str_test(

                             string_in => 'asish'

                             ,

                             start_in => NULL

                             ,

                             end_in => 5

                             )

                       );

      end ut_str_test;

      end ut_str_test;

       

      Thanks in advance. Please help.