-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from seancorfield/develop
- Loading branch information
Showing
4 changed files
with
64 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
component extends="mxunit.framework.TestCase" { | ||
|
||
public void function setUp() { | ||
variables.fw = new org.corfield.framework(); | ||
variables.fw.enableTracing = _enableTracing; | ||
variables.fw.enableTracing(); | ||
request.fw = new org.corfield.framework(); | ||
request.fw.enableTracing = _enableTracing; | ||
request.fw.enableTracing(); | ||
} | ||
|
||
private void function _enableTracing() { | ||
variables.framework.trace = true; | ||
} | ||
|
||
public void function testTraceOutputVar() { | ||
variables.fw.onApplicationStart(); | ||
var output = ""; | ||
savecontent variable="output" { | ||
variables.fw.onRequestEnd(); | ||
} | ||
assertTrue( output contains "framework lifecycle trace" ); | ||
} | ||
|
||
public void function testTraceOutputReq() { | ||
request.fw.onApplicationStart(); | ||
var output = ""; | ||
savecontent variable="output" { | ||
request.fw.onRequestEnd(); | ||
} | ||
assertTrue( output contains "framework lifecycle trace" ); | ||
} | ||
|
||
public void function testNoTraceRenderVar() { | ||
variables.fw.onApplicationStart(); | ||
variables.fw.renderData( "text", "test" ); | ||
var output = ""; | ||
savecontent variable="output" { | ||
variables.fw.onRequestEnd(); | ||
} | ||
assertFalse( output contains "framework lifecycle trace" ); | ||
} | ||
|
||
public void function testTraceOutputReq() { | ||
request.fw.onApplicationStart(); | ||
variables.fw.renderData( "text", "test" ); | ||
var output = ""; | ||
savecontent variable="output" { | ||
request.fw.onRequestEnd(); | ||
} | ||
assertFalse( output contains "framework lifecycle trace" ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters