Package barsuift.simLife.message

Examples of barsuift.simLife.message.PublisherTestHelper.nbUpdated()


        SimLifeDate date = new SimLifeDate();
        PublisherTestHelper publisherHelper = new PublisherTestHelper();
        publisherHelper.addSubscriberTo(date);

        date.addMillis(1);
        assertEquals(1, publisherHelper.nbUpdated());
        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.addMillis(1);
View Full Code Here


        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.addMillis(1);
        assertEquals(1, publisherHelper.nbUpdated());
        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.addSeconds(53);
View Full Code Here

        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.addSeconds(53);
        assertEquals(1, publisherHelper.nbUpdated());
        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.getTimeInMillis();
View Full Code Here

        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.getTimeInMillis();
        assertEquals(0, publisherHelper.nbUpdated());
        assertEquals(0, publisherHelper.getUpdateObjects().size());

        publisherHelper.reset();
        date.formatDate();
        assertEquals(0, publisherHelper.nbUpdated());
View Full Code Here

        assertEquals(0, publisherHelper.nbUpdated());
        assertEquals(0, publisherHelper.getUpdateObjects().size());

        publisherHelper.reset();
        date.formatDate();
        assertEquals(0, publisherHelper.nbUpdated());
        assertEquals(0, publisherHelper.getUpdateObjects().size());
    }

    public void testPublisherSet() {
        SimLifeDate date = new SimLifeDate();
View Full Code Here

        SimLifeDate date = new SimLifeDate();
        PublisherTestHelper publisherHelper = new PublisherTestHelper();
        publisherHelper.addSubscriberTo(date);

        date.setMillisOfSecond(1);
        assertEquals(1, publisherHelper.nbUpdated());
        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.setMillisOfSecond(1);
View Full Code Here

        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.setMillisOfSecond(1);
        assertEquals(1, publisherHelper.nbUpdated());
        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.setSecondOfMinute(53);
View Full Code Here

        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.setSecondOfMinute(53);
        assertEquals(1, publisherHelper.nbUpdated());
        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.set(999, 19, 59, Day.NOSDAY, 3, Month.TOM, 99);
View Full Code Here

        // executed once
        assertEquals(0, splitTask.getNbExecuted());
        assertEquals(0, splitTask.getNbIncrementExecuted());
        assertEquals(2, splitTask.getState().getConditionalTask().getExecutionCondition().getCount());
        assertEquals(8, splitTask.getState().getConditionalTask().getEndingCondition().getCount());
        assertEquals(0, publisherHelper.nbUpdated());
        assertEquals(0, publisherHelper.getUpdateObjects().size());

        // test we can not run the same task again
        try {
            splitTask.run();
View Full Code Here

        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.set(999, 19, 59, Day.NOSDAY, 3, Month.TOM, 99);
        assertEquals(1, publisherHelper.nbUpdated());
        assertEquals(1, publisherHelper.getUpdateObjects().size());
        assertEquals(null, publisherHelper.getUpdateObjects().get(0));

        publisherHelper.reset();
        date.getTimeInMillis();
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.