use of org.apache.sling.discovery.commons.providers.DummyTopologyView in project sling by apache.
the class TestViewStateManager method testBindChangedChangingActivate.
@Test
public void testBindChangedChangingActivate() throws Exception {
final DummyListener listener = new DummyListener();
mgr.bind(listener);
TestHelper.assertNoEvents(listener);
final BaseTopologyView view = new DummyTopologyView().addInstance();
mgr.handleNewView(view);
TestHelper.assertNoEvents(listener);
mgr.handleChanging();
TestHelper.assertNoEvents(listener);
mgr.handleActivated();
TestHelper.assertNoEvents(listener);
final BaseTopologyView view2 = new DummyTopologyView().addInstance();
mgr.handleNewView(view2);
assertEvents(listener, EventHelper.newInitEvent(view2));
randomEventLoop(defaultRandom, listener);
}
Aggregations