Package com.pugh.sockso.music.scheduling

Examples of com.pugh.sockso.music.scheduling.Scheduler


public class SimpleSchedulerTest extends SocksoTestCase {

    public void testShouldRunAt() throws Exception {
        final Properties p = new StringProperties();
        final Scheduler s = new SimpleScheduler( p );
        final DateFormat df = new SimpleDateFormat( "y-M-d H:m:s" );
        p.set( "scheduler.simple.interval", 10 );
        assertTrue( s.shouldRunAt(df.parse("2009-10-10 11:00:00")) );
        assertTrue( s.shouldRunAt(df.parse("2009-10-10 11:10:00")) );
        assertTrue( s.shouldRunAt(df.parse("2009-10-10 12:00:00")) );
        assertFalse( s.shouldRunAt(df.parse("2009-10-10 12:03:00")) );
        assertFalse( s.shouldRunAt(df.parse("2009-10-10 09:31:00")) );
    }
View Full Code Here

TOP

Related Classes of com.pugh.sockso.music.scheduling.Scheduler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.