Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Writing Test Case for Database Connectivity

by manorhce (Beadle)
on Feb 06, 2013 at 07:16 UTC ( #1017348=perlquestion: print w/ replies, xml ) Need Help??
manorhce has asked for the wisdom of the Perl Monks concerning the following question:

I am writing test cases for my application my problem is the modules which is used to connect to database, for that I am writing test cases and it connects to database and loads the database

My Point is that can Perl provides mock database object so that every time it will not connect database, It will create database mock object

UPDATE

I am writing like below

ok($db = Denali::DB->new(), "Connect"); isa_ok($db, "Denali::DB"); my $dddd = Denali::DB->connect();

Replies are listed 'Best First'.
Re: Writing Test Case for Database Connectivity
by kcott (Canon) on Feb 06, 2013 at 07:27 UTC
Re: Writing Test Case for Database Connectivity
by moritz (Cardinal) on Feb 06, 2013 at 10:57 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1017348]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2016-07-28 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (253 votes). Check out past polls.