Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Test</strong>ing the Data Access Application Block 57<br />
Priority<br />
High<br />
High<br />
Medium<br />
Medium<br />
High<br />
Medium<br />
High<br />
Code test case<br />
Verify that the parameter naming convention for a particular database is handled by<br />
the application block instead of being included in the application code. For example,<br />
a SQL Server database requires that parameter names begin with the “@” character.<br />
This should be appended by the application block so that the code remains<br />
portable.<br />
Verify that the performance counters and the event log that are required by the application<br />
block are installed during installation.<br />
Verify that the application block requests or demands the appropriate code access<br />
security permissions for access to protected system resources and operations.<br />
Verify that the application block follows exception management best practices.<br />
Verify that the application block follows security best practices.<br />
Verify that the application block follows globalization best practices.<br />
Verify that the application block follows performance best practices.<br />
Verifying the <strong>Test</strong> Cases<br />
After you identify all the design test cases, you can verify that the design satisfies<br />
them. Table 3 lists how each of the design test cases were verified for the Data Access<br />
Application block.<br />
Table 3: Data Access Application Block Design Verification<br />
Design test case Implemented? Feature that implements design<br />
Verify that the database<br />
providers are extensible.<br />
Yes<br />
The SqlDatabase class and the Oracle-<br />
Database class derive from the Database<br />
base class. This class defines a common<br />
interface that users can extend or modify<br />
to develop their own custom database<br />
providers.<br />
Verify that there is a consistent<br />
approach to creating<br />
any database provider, such<br />
as a SQL Server database,<br />
Oracle database, or a generic<br />
database.<br />
Verify that the application<br />
block supports database-specific<br />
features that are implemented<br />
in the appropriate<br />
Database-derived class. For<br />
example, the SqlDatabase<br />
class supports the ability<br />
to read data that is in XML<br />
format.<br />
Yes<br />
Yes<br />
The DatabaseProviderFactory class is the<br />
factory that creates all objects that derive<br />
from the Database class.<br />
For example, there is a SqlDatabase.<br />
ExecuteXMLReader method that allows<br />
the application block to access XML data<br />
stored in a SQL Server database.<br />
continued