use of io.s4.util.clock.WallClock in project core by s4.
the class TestPersisterWallClock method main.
public static void main(String[] args) {
TestPersisterWallClock testPersisterClock = new TestPersisterWallClock();
s4Clock = new WallClock();
persister = new HashMapPersister(s4Clock);
testPersisterClock.testPersister(persister);
persister = new ConMapPersister(s4Clock);
testPersisterClock.testPersister(persister);
}
use of io.s4.util.clock.WallClock in project core by s4.
the class TestPrototypeWrapper method testCloneAndInitialize.
/**
* Verifies ability to set an initialize method that will be called when
* a new PE is instantiated
*/
@Test
public void testCloneAndInitialize() {
MockPE prototype = new MockPE();
prototype.setInitMethod("testInitialize");
PrototypeWrapper prototypeWrapper = new PrototypeWrapper(prototype, new WallClock());
assertEquals(0, prototype.getInitializeCount());
MockPE instance = (MockPE) prototypeWrapper.getPE("asd");
assertNotNull(instance);
assertEquals(0, prototype.getInitializeCount());
assertEquals(1, instance.getInitializeCount());
}
Aggregations