example/test/example/test/RRSchedulerTest.java
/**
     * Test of end method, of class RRScheduler.
     */
Test of end method, of class RRScheduler.
Test of end method of class RRScheduler .
@Test
    public void testEnd() {
	_scheduler.registerSystem(_counter1, 1);
	_scheduler.registerSystem(_counter2, 2);
	try{
	    _scheduler.makeSchedule();
	} catch(ScheduleIsRunningException e){
	    fail("Schedule shouldnt be running");
	}
	(new Thread(_scheduler)).start();
	try{
	Thread.sleep(100); 
	} catch(Exception e){
	}
	assertTrue(_scheduler.isRunning());
	_scheduler.end();
	assertFalse(_scheduler.isRunning());
	assertEquals(_scheduler.getRuns() , 0);
    }
@ Test public void testEnd ( ) { _scheduler . registerSystem ( _counter1 , 1 ) ; _scheduler . registerSystem ( _counter2 , 2 ) ; try { _scheduler . makeSchedule ( ) ; } catch ( ScheduleIsRunningException e ) { fail ( "Schedule shouldnt be running" ) ; } ( new Thread ( _scheduler ) ) . start ( ) ; try { Thread . sleep ( 100 ) ; } catch ( Exception e ) { } assertTrue ( _scheduler . isRunning ( ) ) ; _scheduler . end ( ) ; assertFalse ( _scheduler . isRunning ( ) ) ; assertEquals ( _scheduler . getRuns ( ) , 0 ) ; }
Test of end method, of class RRScheduler.
Test of end method of class RRScheduler .
//TODO realize this with a lock...