Я хочу, чтобы поддержка обрабатывала тип данных коллекции в ut_expect
в utplsql.
Я хочу провести тестирование пакета ниже с использованием utplsql. Я хочу проверить массив дат.
create or replace PACKAGE pkg_BA_GetAccrualHist
AS
TYPE arr_start_date IS TABLE OF VARCHAR2(12)
INDEX BY BINARY_INTEGER ;
CURSOR cur_BA_GetAccrualHist
(
p_ref_RefNum IN VARCHAR2(15)
)
IS
SELECT TO_CHAR(A.start_date, 'MON DD,YYYY'),
FROM ACCRUAL_HIST A
WHERE A.ref_num = p_ref_RefNum
ORDER BY A.start_date;
PROCEDURE sp_BA_GetAccrualHist_s
(
p_ref_RefNum IN accrual_hist.ref_num%TYPE,
p_dat_StartDate OUT arr_start_date,
);
END pkg_BA_GetAccrualHist;
create or replace PACKAGE BODY pkg_BA_GetAccrualHist
AS
PROCEDURE sp_BA_GetAccrualHist_s
(
p_ref_RefNum IN accrual_hist.ref_num%TYPE,
p_dat_StartDate OUT arr_start_date
) IS
i INTEGER ;
BEGIN
IF NOT cur_BA_GetAccrualHist%ISOPEN
THEN
OPEN cur_BA_GetAccrualHist (p_ref_RefNum);
END IF;
FOR i IN 1.. 10
LOOP
FETCH cur_BA_GetAccrualHist
INTO p_dat_StartDate(i);
IF cur_BA_GetAccrualHist%NOTFOUND
THEN
CLOSE cur_BA_GetAccrualHist;
end IF;
END LOOP;
END sp_BA_GetAccrualHist_s;
END pkg_BA_GetAccrualHist;
MY approach is
create or replace package UT_pkg_BA_GetAccrualHist as
--%suite(SUITE FOR pkg_BA_GetAccrualHist)
--%test(TC1 When all the parameters are passed as '')
procedure UT_sp_BA_GetAccrualHist_T1;
end;
create or replace PACKAGE BODY UT_pkg_BA_GetAccrualHist AS
PROCEDURE UT_sp_BA_GetAccrualHist_T1 IS
P_REF_REFNUM VARCHAR2(15);
P_DAT_STARTDATE TRIMS.PKG_BA_GETACCRUALHIST.ARR_START_DATE;
BEGIN
P_REF_REFNUM := '123456789';
PKG_BA_GETACCRUALHIST.SP_BA_GETACCRUALHIST_S(
P_REF_REFNUM => P_REF_REFNUM,
P_DAT_STARTDATE => P_DAT_STARTDATE);
После этого я не знаю, как обрабатывать тип данных коллекции в ut_expect
. Я много чего перепробовал, но ничего не получится.