|
ColdBox Platform v3.8.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.testing.BaseSpec
coldbox.system.testing.compat.framework.TestCase
public class TestCase
This is the TestBox MXUnit compatible object. You can use this object as a direct replacement To MXUnit BaseTest Case. All assertions found in this object delegate to our core Assertion object.
Method Summary | |
---|---|
any |
assert(string condition, [any message=''])
Assert that the passed expression is true |
any |
assertArrayEquals(array expected, array actual, [any message=''])
Compares two arrays, element by element, and fails if differences exist |
any |
assertEquals(any expected, any actual, [any message=''])
Core assertion that compares the values the EXPECTED and ACTUAL parameters |
any |
assertEqualsCase(any expected, any actual, [any message=''])
Core assertion that compares the values the EXPECTED and ACTUAL parameters with case-sensitivity |
any |
assertFalse(string condition, [any message=''])
Assert something is false |
any |
assertIsArray(any actual, [any message=''])
Assert something is array |
any |
assertIsStruct(any actual, [any message=''])
Assert something is struct |
any |
assertIsTypeOf(any actual, any typeName, [any message=''])
Assert something is of a certrain object type |
any |
assertNotEquals(any expected, any actual, [any message=''])
Core assertion that compares the values the EXPECTED and ACTUAL parameters to NOT be equal |
any |
assertNotSame(any expected, any actual, [any message=''])
Assert that an expected and actual objec is NOT the same instance This only works on objects that are passed by reference, please remember that in Railo arrays pass by reference and in Adobe CF they pass by value |
any |
assertQueryEquals(query expected, query actual, [any message=''])
Compares 2 queries, cell by cell, and fails if differences exist |
any |
assertSame(any expected, any actual, [any message=''])
Assert that an expected and actual objec is the same instance This only works on objects that are passed by reference, please remember that in Railo arrays pass by reference and in Adobe CF they pass by value |
any |
assertStructEquals(struct expected, struct actual, [any message=''])
Compares two structures, key by key, and fails if differences exist |
any |
assertTrue(string condition, [any message=''])
Assert something is true |
any |
debug(any var)
MXUnit style debug |
any |
expectException([any expectedExceptionType], [any expectedExceptionMessage='.*'])
Expect an exception from the testing spec |
any |
fail([any message=''])
Fail assertion |
any |
injectMethod(any receiver, any giver, string functionName, [string functionNameInReceiver='[runtime expression]'])
injects the method from giver into receiver |
any |
injectProperty(any receiver, string propertyName, any propertyValue, [string scope='variables'])
Injects properties into the receiving object |
remote any |
runTestRemote([any testMethod=''], [boolean debug='false'], [any output='simple'])
Run a test remotely like MXUnit |
Methods inherited from class coldbox.system.testing.BaseSpec |
---|
addAssertions, addMatchers, afterEach, beforeEach, clearDebugBuffer, closureStub, console, createEmptyMock, createMock, createStub, describe, expect, expectedException, getDebugBuffer, getMockBox, isExpectedException, it, makePublic, prepareMock, print, println, querySim, runRemote, runSpec, runTestMethod, xdescribe, xit
|
Methods inherited from class WEB-INF.cftags.component |
---|
None
|
Method Detail |
---|
public any assert(string condition, [any message=''])
assert
in class
BaseSpec
condition
message
public any assertArrayEquals(array expected, array actual, [any message=''])
expected
actual
message
public any assertEquals(any expected, any actual, [any message=''])
expected
actual
message
public any assertEqualsCase(any expected, any actual, [any message=''])
expected
actual
message
public any assertFalse(string condition, [any message=''])
condition
message
public any assertIsArray(any actual, [any message=''])
actual
message
public any assertIsStruct(any actual, [any message=''])
actual
message
public any assertIsTypeOf(any actual, any typeName, [any message=''])
actual
typeName
message
public any assertNotEquals(any expected, any actual, [any message=''])
expected
actual
message
public any assertNotSame(any expected, any actual, [any message=''])
expected
actual
message
public any assertQueryEquals(query expected, query actual, [any message=''])
expected
actual
message
public any assertSame(any expected, any actual, [any message=''])
expected
actual
message
public any assertStructEquals(struct expected, struct actual, [any message=''])
expected
actual
message
public any assertTrue(string condition, [any message=''])
condition
message
public any debug(any var)
debug
in class
BaseSpec
var
- The variable to debugpublic any expectException([any expectedExceptionType], [any expectedExceptionMessage='.*'])
expectedExceptionType
- the type to expectexpectedExceptionMessage
- Optional exception messagepublic any fail([any message=''])
fail
in class
BaseSpec
message
- The message to fail withpublic any injectMethod(any receiver, any giver, string functionName, [string functionNameInReceiver='[runtime expression]'])
receiver
giver
functionName
functionNameInReceiver
public any injectProperty(any receiver, string propertyName, any propertyValue, [string scope='variables'])
receiver
propertyName
propertyValue
scope
remote any runTestRemote([any testMethod=''], [boolean debug='false'], [any output='simple'])
testMethod
- A list or array of test names that are the ones that will be executed ONLY!debug
- Show debug output on the reports or notoutput
- The type of reporter to run the test with
|
ColdBox Platform v3.8.0 | ||||
FRAMES |