You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oracle SQL Developer's code template are a good way to support test-first approach.
Managing code template is a responsibility of SQL Developer. However, it would be nice if the utPLSQL extension could install a default set of templates, e.g. via a button in its preference dialog.
The following code templates should be installed:
ut_spec_proc - Test Procedure Skeleton in Package Specification
--%test
PROCEDURE [procedure_name];
ut_body_proc - Test Procedure Skeleton in Package Body
--
-- test ... case ...: ...
--
PROCEDURE [procedure_name] IS
l_actual INTEGER := 0;
l_expected INTEGER := 1;
BEGIN
-- populate actual
-- ...
-- populate expected
-- ...
-- assert
ut.expect(l_actual).to_equal(l_expected);
END [procedure_name];
ut_spec - Full Test Package Specification Skeleton
CREATE OR REPLACE PACKAGE test_[package_name] IS
--%suite(...)
--%suitepath(alltests)
--%context([procedure_name])
--%test
PROCEDURE [procedure_name_1];
--%test
PROCEDURE [procedure_name_2];
--%endcontext
END test_[package_name];
/
ut_body - Full Package Body Skeleton
CREATE OR REPLACE PACKAGE BODY test_[package_name] IS
--
-- test ... case 1: ...
--
PROCEDURE [procedure_name_1] IS
l_actual INTEGER := 0;
l_expected INTEGER := 1;
BEGIN
-- populate actual
-- ...
-- populate expected
-- ...
-- assert
ut.expect(l_actual).to_equal(l_expected);
END [procedure_name_1] ;
--
-- test ... case 2: ...
--
PROCEDURE [procedure_name_2] IS
l_actual INTEGER := 0;
l_expected INTEGER := 1;
BEGIN
-- populate actual
-- ...
-- populate expected
-- ...
-- assert
ut.expect(l_actual).to_equal(l_expected);
END [procedure_name_2];
END test_[package_name];
/
The text was updated successfully, but these errors were encountered:
Oracle SQL Developer's code template are a good way to support test-first approach.
Managing code template is a responsibility of SQL Developer. However, it would be nice if the utPLSQL extension could install a default set of templates, e.g. via a button in its preference dialog.
The following code templates should be installed:
ut_spec_proc - Test Procedure Skeleton in Package Specification
ut_body_proc - Test Procedure Skeleton in Package Body
ut_spec - Full Test Package Specification Skeleton
ut_body - Full Package Body Skeleton
The text was updated successfully, but these errors were encountered: