Package org.apache.torque.test.dbobject

Examples of org.apache.torque.test.dbobject.CurrentTimeTable


        if (!canUseCurrentTimeAsDefaultForTime())
        {
            return;
        }
        CurrentTimeTablePeer.doDelete(new Criteria());
        CurrentTimeTable currentTime = new CurrentTimeTable();

        Date currentDateBefore = doSelect("CURRENT_TIME", Time.class);
        currentTime.save();
        Date currentDateAfter = doSelect("CURRENT_TIME", Time.class);

        List<CurrentTimeTable> dbStateList
                = CurrentTimeTablePeer.doSelect(new Criteria());
        assertEquals(1, dbStateList.size());
        CurrentTimeTable dbState = dbStateList.get(0);
        if (timezoneBuggyInCurrentTime())
        {
            return;
        }
        assertFalse(
                "currentDate should be >= currentDateBefore",
                dbState.getCurrentTimeValue().before(currentDateBefore));
        assertFalse(
                "currentDate should be <= currentDateAfter",
                dbState.getCurrentTimeValue().after(currentDateAfter));
    }
View Full Code Here

TOP

Related Classes of org.apache.torque.test.dbobject.CurrentTimeTable

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.