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

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 Security Application Block 115<br />

<strong>Test</strong> case Result Automated test<br />

Verify that, if<br />

the input data<br />

is valid, the application<br />

block<br />

either creates a<br />

CachingStore-<br />

Provider object<br />

Passed The following test creates one CachingStoreProvider object with<br />

a specific instance name and another CachingStoreProvider object<br />

with the default instance name. The following is the configuration<br />

data that provides the default instance name.<br />

<br />

<br />

<br />

//Thisis the test for the specified instance name<br />

public void CreateNamedSecurityCacheInConfigFile()<br />

{<br />

ISecurityCacheProvider cacheProvider = SecurityCache-<br />

Factory.GetSecurityCacheProvider("CacheProvider");<br />

Assert.IsNotNull(cacheProvider);<br />

}<br />

//This is the test for the default instance name<br />

[<strong>Test</strong>Method]<br />

public void CreateDefaultSecurityCacheFromConfigFile()<br />

{<br />

ISecurityCacheProvider cacheProvider = SecurityCache-<br />

Factory.GetSecurityCacheProvider();<br />

Assert.IsNotNull(cacheProvider);<br />

}<br />

continued

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

Saved successfully!

Ooh no, something went wrong!