import junit.extensions.jfcunit.JFCTestCase; import junit.extensions.jfcunit.JFCTestHelper; import junit.extensions.jfcunit.TestHelper; import junit.extensions.jfcunit.eventdata.JFCEventManager; import activity.SetClockActivity; public class WBTest_SetClockActivity extends JFCTestCase { protected void setUp( ) throws Exception { super.setUp( ); JFCEventManager.setDebug(true); JFCEventManager.setDebugType(JFCEventManager.DEBUG_OUTPUT); JFCEventManager.setRecording(true); } public void testClock() throws InterruptedException{ SetClockActivity sca = new SetClockActivity(); sca.setDelay(10); assertEquals(sca.geDelay(),10); sca.start(); sca.stop(); sca.setDelay(10); sca.start(); sca.start(); sca.stop(); sca.setDelay(0); assertEquals(sca.geDelay(),0); sca.stop(); sca.stop(); sca.setDelay(-1); assertEquals(sca.geDelay(),-1); sca.geDelay(); sca.start(); sca.stop(); } protected void tearDown() throws Exception{ TestHelper.cleanUp( this ); super.tearDown( ); } }