|
Griffon 0.9.5-rc2 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.ObjectGroovyTestCase
griffon.test.GriffonUnitTestCase
class GriffonUnitTestCase extends GroovyTestCase
Support class for writing unit tests in Griffon. It mainly provides access to various mocking options, while making sure that the meta- class magic does not leak outside of a single test. It also provides access to the threading facilities exposed by UIThreadManager.
Property Summary | |
---|---|
def |
execAsync
Executes code asynchronously inside the UI thread |
def |
execFuture
Schedules a block of code as a Future |
def |
execOutside
Executes code outside the UI thread |
def |
execSync
Executes code synchronously inside the UI thread |
def |
isUIThread
True if the current thread is the UI thread |
Map |
savedMetaClasses
|
Constructor Summary | |
GriffonUnitTestCase()
|
Method Summary | |
---|---|
protected GriffonMock
|
mockFor(Class clazz, boolean loose = false)
Creates a new Griffon mock for the given class. |
protected void
|
registerMetaClass(Class clazz)
Use this method when you plan to perform some meta-programming on a class. |
protected void
|
setUp()
|
protected void
|
tearDown()
|
Property Detail |
---|
def execAsync
def execFuture
def execOutside
def execSync
def isUIThread
Map savedMetaClasses
Constructor Detail |
---|
GriffonUnitTestCase()
Method Detail |
---|
protected GriffonMock mockFor(Class clazz, boolean loose = false)
clazz
- The class to mock.loose
- If true
, the method returns a loose-
expectation mock, otherwise it returns a strict one. The default
is a strict mock.
protected void registerMetaClass(Class clazz)
clazz
- The class to register.
protected void setUp()
protected void tearDown()
Groovy Documentation