PageRenderTime 242ms CodeModel.GetById 120ms app.highlight 1ms RepoModel.GetById 120ms app.codeStats 0ms

/wheels/tests/view/miscellaneous/cycle.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 26 lines | 22 code | 4 blank | 0 comment | 0 complexity | 6df7f5d1e789e3bd6e0b73e2b73cc214 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.controller = controller(name="dummy")>
 5		<cfset loc.args = {}>
 6		<cfset loc.args.values = "1,2,3,4,5,6">
 7		<cfset loc.args.name = "cycle_test">
 8		<cfset loc.container = listtoarray(loc.args.values)>
 9	</cffunction>
10
11	<cffunction name="test_named">
12		<cfloop array="#loc.container#" index="loc.r">
13			<cfset loc.e = loc.controller.cycle(argumentcollection=loc.args)>
14			<cfset assert("loc.e eq loc.r")>
15		</cfloop>
16	</cffunction>
17
18	<cffunction name="test_not_named">
19		<cfset structdelete(loc.args, "name")>
20		<cfloop array="#loc.container#" index="loc.r">
21			<cfset loc.e = loc.controller.cycle(argumentcollection=loc.args)>
22			<cfset assert("loc.e eq loc.r")>
23		</cfloop>
24	</cffunction>
25
26</cfcomponent>