CacheStrategyManagerTest

Package: MachII.tests.caching
Inherits from: mxunit.framework.TestCase
Test cases for MachII.caching.CacheStats.

<!--- License: Copyright 2008 GreatBizTools, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright: GreatBizTools, LLC Author: Peter J. Farrell(peter@mach-ii.com) $Id: CacheStrategyManagerTest.cfc 755 2008-05-02 21:26:44Z peterfarrell $ Created version: 1.6.0 Updated version: 1.6.0 Notes: --->

Method Summary
public void setup()

Logic to run to setup before each test case method.

public void tearDown()

Logic to run to tear down after each test case method.

public void testLoadConfigureGet()

Tests load(), configure() and get() routines.

Method Detail
setup

public void setup( )

Logic to run to setup before each test case method.

Parameters:

Code:

	<cffunction name="setup" access="public" returntype="void" output="false"
		hint="Logic to run to setup before each test case method.">
		<cfset variables.cacheStrategyManager = CreateObject("component", "MachII.caching.CacheStrategyManager").init() />
	</cffunction> 

tearDown

public void tearDown( )

Logic to run to tear down after each test case method.

Parameters:

Code:

	<cffunction name="tearDown" access="public" returntype="void" output="false"
		hint="Logic to run to tear down after each test case method.">
		
	</cffunction> 

testLoadConfigureGet

public void testLoadConfigureGet( )

Tests load(), configure() and get() routines.

Parameters:

Code:

	<cffunction name="testLoadConfigureGet" access="public" returntype="void"
		hint="Tests load(), configure() and get() routines.">
		
		<cfset var strategy = "" />
		
		
		<cfset variables.cacheStrategyManager.loadStrategy("default", "MachII.caching.strategies.TimeSpanCache") />
		
		
		<cfset variables.cacheStrategyManager.configure() />
		
		
		<cfset strategy = variables.cacheStrategyManager.getCacheStrategyByName("default") />
		
		
		<cfset assertTrue(IsObject(strategy)) />
	</cffunction>