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 <strong>Enterprise</strong> <strong>Library</strong> Core 69<br />
Priority<br />
High<br />
High<br />
Medium<br />
High<br />
High<br />
Medium<br />
High<br />
Code test case<br />
Verify that the application block uses the Logging Application Block to log the exceptions.<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 to access 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 Exception<br />
Handling Application Block.<br />
Table 3: Exception Handling Application Block Design Verification<br />
Implemented?<br />
Feature that implements Design test case<br />
design<br />
Verify that the exception handlers<br />
and the exception formatters<br />
are extensible.<br />
Verify that there is a consistent<br />
approach to creating exception<br />
policies, exception handlers,<br />
and exception formatters.<br />
Verify that there is a façade<br />
that mediates between the<br />
client code and the application<br />
block to handle exceptions.<br />
Verify that the application block<br />
generates a new GUID named<br />
the HandlingInstanceID for<br />
every exception that is<br />
handled.<br />
Verify that the ability to create<br />
the application block’s domain<br />
objects from the configuration<br />
data follows the Dependency<br />
Injection pattern.<br />
Yes<br />
Yes<br />
Yes<br />
Yes<br />
Yes<br />
The IExceptionHandler interface allows users to<br />
implement a configurable exception handler. The<br />
ExceptionFormatter class allows users to extend<br />
an exception formatter.<br />
The ExceptionHandlerCustomFactory class is the<br />
factory that creates the objects that implement the<br />
IExceptionHandler interface.<br />
The ExceptionPolicy class is a façade that acts<br />
as the interface between the client code and the<br />
application block.<br />
The ExceptionPolicyEntry.Handle method generates<br />
a new GUID named the HandlingInstanceID<br />
and passes that GUID to the exception handlers.<br />
The ExceptionPolicyFactory class derives from the<br />
LocatorNameTypeFactoryBase generic type, which<br />
takes the configuration source as input, creates<br />
the domain object, and injects the relevant configuration<br />
data into the domain object.<br />
continued