<?xml version="1.0" encoding="windows-1252"?>
<node id="1017348" title="Writing Test Case for Database Connectivity" created="2013-02-06 02:16:29" updated="2013-02-06 02:16:29">
<type id="115">
perlquestion</type>
<author id="1016711">
manorhce</author>
<data>
<field name="doctext">
&lt;p&gt; 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 &lt;/p&gt;

&lt;p&gt;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&lt;/p&gt;

&lt;p&gt;UPDATE&lt;/p&gt;
&lt;p&gt; I am writing like below &lt;/p&gt;
&lt;code&gt;  
ok($db = Denali::DB-&gt;new(), "Connect");
isa_ok($db,  "Denali::DB");

my $dddd = Denali::DB-&gt;connect();
&lt;/code&gt;</field>
</data>
</node>
