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.
56<br />
<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />
Table 1: Data Access Application Block Design <strong>Test</strong> Cases<br />
Priority<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
Design test case<br />
Verify that the database providers are extensible.<br />
Verify that there is a consistent approach to creating any database provider, such as<br />
a SQL Server database, Oracle database, or a generic database.<br />
Verify that the application block supports database-specific features that are implemented<br />
in the appropriate Database-derived class. For example, the SqlDatabase<br />
class supports the ability to read data that is in XML format.<br />
Verify that the application block supports the parameter discovery feature.<br />
Verify that the ability to create the application block’s domain objects from configuration<br />
data follows the Dependency Injection pattern.<br />
Verify that the application block can retrieve configuration data from different<br />
sources, such as an application configuration file, a database, or from memory.<br />
Verify that the application block can manage database connections.<br />
Verify that the instrumentation is implemented with loosely coupled events.<br />
Verify that the design addresses situations that can cause exceptions and that the<br />
application block logs the exceptions through the instrumentation.<br />
After you identify the design issues, you should do the same for the code. Table 2<br />
lists the test cases that the Data Access Application Block’s code must satisfy.<br />
Table 2: Data Access Application Block Code <strong>Test</strong> Cases<br />
Priority<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
High<br />
Code test case<br />
Verify that the DatabaseProviderFactory class creates a new Database-derived<br />
instance for each request.<br />
Verify that an assembler class that implements the IDatabaseAssembler interface<br />
creates the Database-derived objects and injects the configuration object values<br />
into those domain objects.<br />
Verify that the application block uses performance counters to monitor database<br />
operations when the performance counters are enabled.<br />
Verify that the application block uses WMI and the event log to monitor errors during<br />
database operations when WMI and the event log are enabled.<br />
Verify that the connection string property is configurable and is implemented as a<br />
connection string section that is supported by the .NET Framework.<br />
Verify that the application block can use an instance name to create a Databasederived<br />
object.<br />
Verify that the application block can use a default instance name to create a Database-derived<br />
object.<br />
Verify that the application block exposes configuration properties for Oracle packages<br />
as public and that they are configurable.<br />
Verify that the application block caches parameter discovery information and then<br />
retrieves it from the cache when it is required.