Groovy Documentation

griffon.uispec4j
[Groovy] Class GriffonUISpecTestCase

java.lang.Object
  junit.framework.Assert
      junit.framework.TestCase
          org.uispec4j.UISpecTestCase
              griffon.uispec4j.GriffonUISpecTestCase

abstract class GriffonUISpecTestCase
extends org.uispec4j.UISpecTestCase

Authors:
Andres Almiray


Field Summary
protected SwingGriffonApplication app

private boolean realized

private Object realizedLock

private Map savedMetaClasses

 
Property Summary
def execFuture

Schedules a block of code as a Future

def execInsideUIAsync

Executes code asynchronously inside the UI thread

def execInsideUISync

Executes code synchronously inside the UI thread

def execOutsideUI

Executes code outside the UI thread

def isUIThread

True if the current thread is the UI thread

 
Constructor Summary
GriffonUISpecTestCase()

 
Method Summary
protected org.uispec4j.UISpecAdapter initAdapter()

private void initApp()

protected GriffonMock mockFor(Class clazz, boolean loose = false)

Creates a new Griffon mock for the given class.

protected void onSetUp()

protected void onTearDown()

protected void registerMetaClass(Class clazz)

Use this method when you plan to perform some meta-programming on a class.

protected void setUp()

private void setUpTestCase()

protected void setupConfig(SwingGriffonApplication app)

protected void tearDown()

private void tearDownTestCase()

 
Methods inherited from class org.uispec4j.UISpecTestCase
org.uispec4j.UISpecTestCase#and([Lorg.uispec4j.assertion.Assertion;), org.uispec4j.UISpecTestCase#or([Lorg.uispec4j.assertion.Assertion;), org.uispec4j.UISpecTestCase#not(org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#setAdapter(org.uispec4j.UISpecAdapter), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, boolean, org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#assertEquals(boolean, org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#assertTrue(java.lang.String, org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#assertTrue(org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#getMainWindow(), org.uispec4j.UISpecTestCase#assertThat(org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#assertThat(java.lang.String, org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#waitUntil(org.uispec4j.assertion.Assertion, long), org.uispec4j.UISpecTestCase#waitUntil(java.lang.String, org.uispec4j.assertion.Assertion, long), org.uispec4j.UISpecTestCase#assertFalse(java.lang.String, org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#assertFalse(org.uispec4j.assertion.Assertion), org.uispec4j.UISpecTestCase#run(), org.uispec4j.UISpecTestCase#run(junit.framework.TestResult), org.uispec4j.UISpecTestCase#toString(), org.uispec4j.UISpecTestCase#getName(), org.uispec4j.UISpecTestCase#setName(java.lang.String), org.uispec4j.UISpecTestCase#countTestCases(), org.uispec4j.UISpecTestCase#runBare(), org.uispec4j.UISpecTestCase#format(java.lang.String, java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#fail(), org.uispec4j.UISpecTestCase#fail(java.lang.String), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, int, int), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#assertEquals(java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, java.lang.String, java.lang.String), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, java.lang.String), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, double, double, double), org.uispec4j.UISpecTestCase#assertEquals(double, double, double), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, float, float, float), org.uispec4j.UISpecTestCase#assertEquals(float, float, float), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, long, long), org.uispec4j.UISpecTestCase#assertEquals(long, long), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, boolean, boolean), org.uispec4j.UISpecTestCase#assertEquals(boolean, boolean), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, byte, byte), org.uispec4j.UISpecTestCase#assertEquals(byte, byte), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, char, char), org.uispec4j.UISpecTestCase#assertEquals(char, char), org.uispec4j.UISpecTestCase#assertEquals(short, short), org.uispec4j.UISpecTestCase#assertEquals(java.lang.String, short, short), org.uispec4j.UISpecTestCase#assertEquals(int, int), org.uispec4j.UISpecTestCase#assertTrue(java.lang.String, boolean), org.uispec4j.UISpecTestCase#assertTrue(boolean), org.uispec4j.UISpecTestCase#assertFalse(java.lang.String, boolean), org.uispec4j.UISpecTestCase#assertFalse(boolean), org.uispec4j.UISpecTestCase#assertNotNull(java.lang.String, java.lang.Object), org.uispec4j.UISpecTestCase#assertNotNull(java.lang.Object), org.uispec4j.UISpecTestCase#assertNull(java.lang.String, java.lang.Object), org.uispec4j.UISpecTestCase#assertNull(java.lang.Object), org.uispec4j.UISpecTestCase#assertSame(java.lang.String, java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#assertSame(java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#assertNotSame(java.lang.String, java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#assertNotSame(java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#failSame(java.lang.String), org.uispec4j.UISpecTestCase#failNotSame(java.lang.String, java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#failNotEquals(java.lang.String, java.lang.Object, java.lang.Object), org.uispec4j.UISpecTestCase#wait(), org.uispec4j.UISpecTestCase#wait(long), org.uispec4j.UISpecTestCase#wait(long, int), org.uispec4j.UISpecTestCase#equals(java.lang.Object), org.uispec4j.UISpecTestCase#hashCode(), org.uispec4j.UISpecTestCase#getClass(), org.uispec4j.UISpecTestCase#notify(), org.uispec4j.UISpecTestCase#notifyAll()
 
Methods inherited from class TestCase
run, run, toString, getName, setName, countTestCases, runBare, format, fail, fail, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertTrue, assertTrue, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertNotSame, assertNotSame, failSame, failNotSame, failNotEquals, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll
 

Field Detail

app

protected SwingGriffonApplication app


realized

private boolean realized


realizedLock

private final Object realizedLock


savedMetaClasses

private Map savedMetaClasses


 
Property Detail

execFuture

def execFuture
Schedules a block of code as a Future


execInsideUIAsync

def execInsideUIAsync
Executes code asynchronously inside the UI thread


execInsideUISync

def execInsideUISync
Executes code synchronously inside the UI thread


execOutsideUI

def execOutsideUI
Executes code outside the UI thread


isUIThread

def isUIThread
True if the current thread is the UI thread


 
Constructor Detail

GriffonUISpecTestCase

GriffonUISpecTestCase()


 
Method Detail

initAdapter

protected org.uispec4j.UISpecAdapter initAdapter()


initApp

private final void initApp()


mockFor

protected GriffonMock mockFor(Class clazz, boolean loose = false)
Creates a new Griffon mock for the given class. Use it as you would use MockFor and StubFor.
Parameters:
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.


onSetUp

protected void onSetUp()


onTearDown

protected void onTearDown()


registerMetaClass

protected void registerMetaClass(Class clazz)
Use this method when you plan to perform some meta-programming on a class. It ensures that any modifications you make will be cleared at the end of the test.
Parameters:
clazz - The class to register.


setUp

protected final void setUp()


setUpTestCase

private void setUpTestCase()


setupConfig

protected void setupConfig(SwingGriffonApplication app)


tearDown

protected final void tearDown()


tearDownTestCase

private void tearDownTestCase()


 

Groovy Documentation