Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow beforetest/aftertest procedures to accept parameters #491
Comments
|
I am having a second thought now. create or replace package my_test is
--%suite
procedure build_user(a_param varchar2);
--%test
--%beforetest( build_user(123) )
procedure do_the_test;
end;
/
create or replace package body my_test is
procedure build_user(a_param varchar2) is
begin
--do some stuff here
null;
end;
procedure do_the_test is
begin
--Assert
ut.expect(get_user()).to_equal('123');
end;
end;
/You could have: create or replace package my_test is
--%suite
--%test
procedure do_the_test;
end;
/
create or replace package body my_test is
procedure build_user(a_param varchar2) is
begin
--do some stuff here
null;
end;
procedure do_the_test is
begin
--Arrange
build_user(123);
--Assert
ut.expect(get_user()).to_equal('123');
end;
end;
/ |
|
@Hkyle |
You can call procedures with beforetest or aftertest annotation, but it doesn't seem possible to pass any parameters through them. Is it possible to add this capability?
For example -
--% beforetest(build_user(123))--% beforetest(build_user('missing_name'))It would allow much greater reusability of setup procedures.