Examples of TestClock


Examples of com.cloud.utils.concurrency.TestClock

            int daysPerWeek = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.week"), 7);
            int daysPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.month"), 30);
            int weeksPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.weeks.per.month"), 4);
            int monthsPerYear = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.months.per.year"), 12);

            _testTimerTask = new TestClock(this, minutesPerHour, hoursPerDay, daysPerWeek, daysPerMonth, weeksPerMonth, monthsPerYear);
        }
        _currentTimestamp = new Date();

        s_logger.info("Snapshot Scheduler is configured.");
View Full Code Here

Examples of com.cloud.utils.concurrency.TestClock

            int daysPerWeek = NumbersUtil.parseInt(configDao.getValue("snapshot.test.days.per.week"), 7);
            int daysPerMonth = NumbersUtil.parseInt(configDao.getValue("snapshot.test.days.per.month"), 30);
            int weeksPerMonth = NumbersUtil.parseInt(configDao.getValue("snapshot.test.weeks.per.month"), 4);
            int monthsPerYear = NumbersUtil.parseInt(configDao.getValue("snapshot.test.months.per.year"), 12);

            _testTimerTask = new TestClock(this, minutesPerHour, hoursPerDay, daysPerWeek, daysPerMonth, weeksPerMonth, monthsPerYear);
        }
        _currentTimestamp = new Date();
        s_logger.info("Snapshot Scheduler is configured.");

        return true;
View Full Code Here

Examples of com.cloud.utils.concurrency.TestClock

            int daysPerWeek = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.week"), 7);
            int daysPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.month"), 30);
            int weeksPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.weeks.per.month"), 4);
            int monthsPerYear = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.months.per.year"), 12);

            _testTimerTask = new TestClock(this, minutesPerHour, hoursPerDay, daysPerWeek, daysPerMonth, weeksPerMonth, monthsPerYear);
        }
        _currentTimestamp = new Date();

        s_logger.info("Snapshot Scheduler is configured.");
View Full Code Here

Examples of com.cloud.utils.concurrency.TestClock

            final int daysPerWeek = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.week"), 7);
            final int daysPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.month"), 30);
            final int weeksPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.weeks.per.month"), 4);
            final int monthsPerYear = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.months.per.year"), 12);

            _testTimerTask = new TestClock(this, minutesPerHour, hoursPerDay, daysPerWeek, daysPerMonth, weeksPerMonth, monthsPerYear);
        }
        _currentTimestamp = new Date();

        s_logger.info("Snapshot Scheduler is configured.");
View Full Code Here

Examples of com.cloud.utils.concurrency.TestClock

            int daysPerWeek = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.week"), 7);
            int daysPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.month"), 30);
            int weeksPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.weeks.per.month"), 4);
            int monthsPerYear = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.months.per.year"), 12);

            _testTimerTask = new TestClock(this, minutesPerHour, hoursPerDay, daysPerWeek, daysPerMonth, weeksPerMonth, monthsPerYear);
        }
        _currentTimestamp = new Date();

        s_logger.info("Snapshot Scheduler is configured.");
View Full Code Here

Examples of com.cloud.utils.concurrency.TestClock

            int daysPerWeek = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.week"), 7);
            int daysPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.days.per.month"), 30);
            int weeksPerMonth = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.weeks.per.month"), 4);
            int monthsPerYear = NumbersUtil.parseInt(_configDao.getValue("snapshot.test.months.per.year"), 12);

            _testTimerTask = new TestClock(this, minutesPerHour, hoursPerDay, daysPerWeek, daysPerMonth, weeksPerMonth, monthsPerYear);
        }
        _currentTimestamp = new Date();
       
        s_logger.info("Snapshot Scheduler is configured.");
View Full Code Here

Examples of org.apache.isis.application.system.TestClock

public abstract class ValueTestCase extends TestCase {
    protected void setUp() throws Exception {
        Logger.getRootLogger().setLevel(Level.OFF);
        // new MockObjectSpecificationLoader();
        new TestClock();
    }
View Full Code Here

Examples of org.apache.isis.application.system.TestClock

    private Date actual;

    protected void setUp() throws Exception {
        Logger.getRootLogger().setLevel(Level.OFF);
       
        Date.setClock(new TestClock());
        actual = new Date(2000, 2, 1);
    }
View Full Code Here

Examples of uk.org.woodcraft.bookings.utils.TestClock

    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
   
    List<Unit> testUnits = new ArrayList<Unit>(50);
    List<Booking> testBookings = new ArrayList<Booking>(50);
    List<String> testNames = new ArrayList<String>(52);
    TestClock clock = new TestClock(TestConstants.DATE_BEFORE_DEADLINE);
   
    for (int i = 0; i < 50; i++) {
      Unit testUnit = new Unit("Test Unit "+i, org, true);
      testUnits.add(testUnit);
    }
View Full Code Here

Examples of uk.org.woodcraft.bookings.utils.TestClock

    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
   
    List<Unit> testUnits = new ArrayList<Unit>(50);
    List<Transaction> testTransactions = new ArrayList<Transaction>(100);
    List<String> testTransNames = new ArrayList<String>(103);
    TestClock clock = new TestClock(TestConstants.DATE_BEFORE_DEADLINE);
   
    for (int i = 0; i < 50; i++) {
      Unit testUnit = new Unit("Test Unit "+i, org, true);
      testUnits.add(testUnit);
    }
    CannedQueries.save(testUnits);
   
    int transNumber = 0;
    for(Unit unit : testUnits)
    {
      String transName = "Test Trans "+transNumber++;
      testTransactions.add(new Transaction(unit.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), clock.getTime(),
                        TransactionType.Payment,  transName, null, 1.0d));
      testTransNames.add(transName);
    }
    CannedQueries.save(testTransactions);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.