|
Revision 1824, 1.2 kB
(checked in by lmajano, 5 years ago)
|
|
More testing
Lightwire Performance Enhancements and cleanup.
|
-
Property svn:mime-type set to
text/plain
|
| Line | |
|---|
| 1 | <cfcomponent name="requestContextDecoratorTest" extends="coldbox.testing.tests.resources.baseMockCase"> |
|---|
| 2 | |
|---|
| 3 | <!--- setup and teardown ---> |
|---|
| 4 | |
|---|
| 5 | <cffunction name="setUp" returntype="void" access="public"> |
|---|
| 6 | <cfscript> |
|---|
| 7 | this.decorator = createObject("component","coldbox.system.beans.requestContextDecorator"); |
|---|
| 8 | this.rc = createObject("component","coldbox.system.beans.requestContext"); |
|---|
| 9 | this.controller = createObject("component","coldbox.system.controller"); |
|---|
| 10 | |
|---|
| 11 | this.decorator.init(this.rc,this.controller); |
|---|
| 12 | </cfscript> |
|---|
| 13 | </cffunction> |
|---|
| 14 | |
|---|
| 15 | <cffunction name="tearDown" returntype="void" access="public"> |
|---|
| 16 | <!--- Any code needed to return your environment to normal goes here ---> |
|---|
| 17 | </cffunction> |
|---|
| 18 | |
|---|
| 19 | <!--- Begin specific tests ---> |
|---|
| 20 | |
|---|
| 21 | <cffunction name="testRC" access="public" returnType="void"> |
|---|
| 22 | <cfscript> |
|---|
| 23 | assertEquals( this.rc, this.decorator.getRequestContext() ); |
|---|
| 24 | </cfscript> |
|---|
| 25 | </cffunction> |
|---|
| 26 | |
|---|
| 27 | <cffunction name="testgetController" access="public" returnType="void"> |
|---|
| 28 | <cfscript> |
|---|
| 29 | makePublic(this.decorator,"getController","_getController"); |
|---|
| 30 | this.decorator.init(this.rc,this.controller); |
|---|
| 31 | assertEquals( this.controller, this.decorator._getController() ); |
|---|
| 32 | </cfscript> |
|---|
| 33 | </cffunction> |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | </cfcomponent> |
|---|