PageRenderTime 260ms CodeModel.GetById 139ms app.highlight 1ms RepoModel.GetById 80ms app.codeStats 0ms

/wheels/tests/global/public/humanize.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 33 lines | 26 code | 7 blank | 0 comment | 0 complexity | 6729395a4e871be2a9901d83cb1500b9 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="test_normal_variable">
 4		<cfset loc.result = humanize("wheelsIsAFramework")>
 5		<cfset assert("NOT Compare(loc.result, 'Wheels Is A Framework')")>
 6	</cffunction>
 7
 8	<cffunction name="test_variable_starting_with_uppercase">
 9		<cfset loc.result = humanize("WheelsIsAFramework")>
10		<cfset assert("NOT Compare(loc.result, 'Wheels Is A Framework')")>
11	</cffunction>
12
13	<cffunction name="test_abbreviation">
14		<cfset loc.result = humanize("CFML")>
15		<cfset assert("NOT Compare(loc.result, 'CFML')")>
16	</cffunction>
17
18	<cffunction name="test_abbreviation_as_exception">
19		<cfset loc.result = humanize(text="ACfmlFramework", except="CFML")>
20		<cfset assert("NOT Compare(loc.result, 'A CFML Framework')")>
21	</cffunction>
22
23	<cffunction name="test_exception_within_string">
24		<cfset loc.result = humanize(text="ACfmlFramecfmlwork", except="CFML")>
25		<cfset assert("NOT Compare(loc.result, 'A CFML Framecfmlwork')")>
26	</cffunction>
27
28	<cffunction name="test_abbreviation_without_exception_cannot_be_done">
29		<cfset loc.result = humanize("wheelsIsACFMLFramework")>
30		<cfset assert("NOT Compare(loc.result, 'Wheels Is ACFML Framework')")>
31	</cffunction>
32
33</cfcomponent>