07.11.2014 Views

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

102<br />

<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />

Selecting the <strong>Test</strong> Cases<br />

The first step in a functional review is to make sure that the design and the code support<br />

these requirements. You do this by deciding the test cases that they must satisfy<br />

so that the application block fulfills all its requirements.<br />

Table 1 lists the test cases that the application block’s design must satisfy.<br />

Table 1: Security Application Block Design Cases<br />

Priority<br />

High<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 application block can be extended with custom authorization providers<br />

and custom security cache providers.<br />

Verify that there is a consistent approach to creating authorization providers and security<br />

cache providers.<br />

Verify that the application block provides a simple method to perform authorization.<br />

Verify that the application block provides simple methods to save, expire, and retrieve<br />

an identity from a caching store.<br />

Verify that the application block implements the standard provider model for authorization<br />

and security-related operations.<br />

Verify that the ability to create the application block’s domain objects from the configuration<br />

data follows the Dependency Injection pattern.<br />

Verify that the application block can retrieve configuration data from different sources,<br />

such as an application configuration file, a database, or from memory.<br />

Verify that the instrumentation is implemented with loosely coupled events.<br />

Verify that situations that can cause exceptions are addressed and that the application<br />

block logs the exceptions through the instrumentation.<br />

Verify that the application block supports custom property collections for the custom<br />

authorization providers and custom caching stores.<br />

After you identify the design issues, you should do the same for the code. Table 2<br />

lists the test cases that the Security Application Block code must satisfy.<br />

Table 2: Security Application Block Code <strong>Test</strong> Cases<br />

Priority<br />

High<br />

High<br />

High<br />

High<br />

High<br />

Code test case<br />

Verify that the application block creates one instance of the AuthorizationProvider<br />

class for each request.<br />

Verify that the application block only creates one instance of the SecurityCacheProvider<br />

class for the specified instance name.<br />

Verify that the assembler classes that implements the IAssembler interface create the<br />

authorization providers and the security cache providers, and verify that the assembler<br />

classes inject the configuration object values into those domain objects.<br />

Verify that the configuration properties of the authorization and security cache providers<br />

are exposed as public and that they are strongly typed.<br />

Verify that the configuration properties for the custom providers are exposed as public<br />

and that they are implemented as custom property collections.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!