in reply to Checking parameters passed to a third party module during testing
If I understand the description correctly, your code looks like this:
and you want to check %params from the test file.sub ... { # stuff to parse the email my %params = ... my $msg = MIME::Lite->new (%params); my $result = eval {$msg->send}; }
If that is the case, you could add a validation routine for %params and call it before you create the MIME::Lite object. Then the test file could test the validation routine.
I'm not completely sure what you mean when you say "check the contents of %params is as I expect without from the test code without instrumenting my module under test", though, so this may not be an option. Also, I assume when you said %params is local to the sub you meant it was lexically scoped to the sub, not declared with local.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Checking parameters passed to a third party module during testing
by GrandFather (Saint) on Oct 18, 2006 at 06:08 UTC |