|
ColdBox Platform - MockBox Version 1.2 | ||||
| FRAMES | |||||
WEB-INF.cftags.component
mxunit.framework.Assert
mxunit.framework.TestCase
mockbox.system.testing.BaseTestCase
public class BaseTestCase
A base test case for doing ColdBox Testing based on the MXUnit Framework
| Method Summary | |
|---|---|
private void |
$abort()
Facade for cfabort |
private void |
$dump(any var, [boolean isAbort='false'])
Facade for cfmx dump |
private void |
$include([string template])
Facade for cfinclude |
private void |
$rethrow(any throwObject)
Rethrow facade |
private any |
$throw(string message, [string detail=''], [string type='Framework'])
Facade for cfthrow |
private void |
announceInterception(string state, [struct interceptData='[runtime expression]'])
Announce an interception in the system |
private any |
execute(string event, [boolean private='false'], [boolean prepostExempt='false'])
Executes a framework lifecycle by executing an event |
private string |
getAppMapping()
Get the AppMapping used for this test case |
private string |
getColdboxAppKey()
Get the coldboxAppKey used to store the coldbox controller in application scope |
private any |
getColdboxOCM()
Get a reference to the cache manager |
private string |
getConfigMapping()
Get the ConfigMapping for this test case |
private any |
getController()
Get a reference to the ColdBox mock controller |
private mockbox.system.web.Flash.AbstractFlashScope |
getFlashScope()
Returns to you the currently used flash ram object |
private any |
getInterceptor([string interceptorName], [boolean deepSearch='false'])
Get an interceptor |
private MockBox |
getMockBox()
Get a reference to the MockBox framework |
private any |
getMockModel(string name, [boolean clearMethods='false'])
*ColdBox must be loaded for this to work |
private mockbox.system.web.context.RequestContext |
getMockRequestContext([boolean clearMethods='false'])
Builds an empty functioning request context mocked with methods via MockBox |
private any |
getModel(string name, [boolean useSetterInjection='false'], [string onDICompleteUDF='onDIComplete'], [boolean debugMode='false'])
Create or retrieve model objects by convention |
private any |
getRequestContext()
Get a reference to the current mock request context |
private Util |
getUtil()
Create and return a util object |
private void |
metadataInspection()
Inspect test case for annotations |
private query |
querySim(string queryData)
Query Simulator |
private void |
reset()
Reset the persistence of the unit test coldbox app, basically removes the controller from application scope |
private void |
setAppMapping(string AppMapping)
Set the AppMapping for this test case |
private void |
setColdboxAppKey(string coldboxAppKey)
Override the coldboxAppKey, used to store the coldbox controller in application scope |
private void |
setConfigMapping(string ConfigMapping)
Set the ConfigMapping for this test case |
any |
setup()
The main setup method for running ColdBox enabled tests |
private void |
setupRequest(string event)
Setup an initial request capture |
any |
tearDown()
The main teardown for ColdBox enabled applications |
| Methods inherited from class mxunit.framework.TestCase |
|---|
TestCase, addTrace, clearDebug, createRequestScopeDebug, createResult, debug, dump, getDebug, getDebugWrapper, getRunnableMethods, getTrace, initDebug, initProperties, injectMethod, injectProperty, makePublic, print, println, run, runBare, runTest, runTestRemote, setDebugWrapper, stopRequestScopeDebug, testIsAcceptable, toStringValue
|
| Methods inherited from class mxunit.framework.Assert |
|---|
addAssertDecorator, addAssertDecorators, assert, assertEquals, assertFalse, assertNotEquals, assertNotSame, assertSame, assertTrue, clearClassVariables, fail, failEquals, failNotEquals, getHashCode, getStringValue, getTestStyle, init, normalizeArguments, setTestStyle, throwWrapper
|
| Methods inherited from class WEB-INF.cftags.component |
|---|
|
| Method Detail |
|---|
private void $abort()
private void $dump(any var, [boolean isAbort='false'])
varisAbort - Abort alsoprivate void $include([string template])
templateprivate void $rethrow(any throwObject)
throwObject - The cfcatch objectprivate any $throw(string message, [string detail=''], [string type='Framework'])
messagedetailtypeprivate void announceInterception(string state, [struct interceptData='[runtime expression]'])
state - The interception state to executeinterceptData - A data structure used to pass intercepted information.private any execute(string event, [boolean private='false'], [boolean prepostExempt='false'])
event - The event to executeprivate - Call a private event or notprepostExempt - If true, pre/post handlers will not be fired.private string getAppMapping()
private string getColdboxAppKey()
private any getColdboxOCM()
private string getConfigMapping()
private any getController()
private mockbox.system.web.Flash.AbstractFlashScope getFlashScope()
private any getInterceptor([string interceptorName], [boolean deepSearch='false'])
interceptorName - The name of the interceptor to search fordeepSearch - By default we search the cache for the interceptor reference. If true, we search all the registered interceptor states for a match.private MockBox getMockBox()
private any getMockModel(string name, [boolean clearMethods='false'])
name - The name of the model to mockclearMethods - If true, all methods in the target mock object will be removed. You can then mock only the methods that you want to mockprivate mockbox.system.web.context.RequestContext getMockRequestContext([boolean clearMethods='false'])
clearMethods - Clear Methods on it?private any getModel(string name, [boolean useSetterInjection='false'], [string onDICompleteUDF='onDIComplete'], [boolean debugMode='false'])
name - The name of the model to retrieveuseSetterInjection - Whether to use setter injection alongside the annotations property injection. cfproperty injection takes precedence.onDICompleteUDF - After Dependencies are injected, this method will look for this UDF and call it if it exists. The default value is onDICompletedebugMode - Debugging Mode or notprivate any getRequestContext()
private Util getUtil()
private void metadataInspection()
private query querySim(string queryData)
queryData - The data to create queriesprivate void reset()
private void setAppMapping(string AppMapping)
AppMappingprivate void setColdboxAppKey(string coldboxAppKey)
coldboxAppKeyprivate void setConfigMapping(string ConfigMapping)
ConfigMappingpublic any setup()
private void setupRequest(string event)
event - The event to setup the request context withpublic any tearDown()
tearDown
in class
mxunit.framework.TestCase
|
ColdBox Platform - MockBox Version 1.2 | ||||
| FRAMES | |||||