use of org.eclipse.scout.rt.mom.api.NullMomImplementor in project scout.rt by eclipse.
the class ClientNotificationClusterNotificationTest method before.
@Before
public void before() throws Exception {
m_nullMomImplementorSpy = spy(NullMomImplementor.class);
m_beans.add(TestingUtility.registerBean(new BeanMetaData(TestClusterMom.class)));
m_beans.add(TestingUtility.registerBean(new BeanMetaData(NullMomImplementor.class).withProducer(new IBeanInstanceProducer<IMomImplementor>() {
@Override
public IMomImplementor produce(IBean<IMomImplementor> bean) {
return m_nullMomImplementorSpy;
}
})));
// verify that replacement works
assertSame("NullMomImplementor-Spy expected", m_nullMomImplementorSpy, BEANS.get(NullMomImplementor.class));
m_svc = new ClusterSynchronizationService();
m_svc.enable();
ClientNotificationTestRegistry reg = new ClientNotificationTestRegistry();
m_beans.add(TestingUtility.registerBean(new BeanMetaData(ClientNotificationRegistry.class, reg)));
reg.registerSession(TEST_NODE, "test", TEST_USER);
}
use of org.eclipse.scout.rt.mom.api.NullMomImplementor in project scout.rt by eclipse.
the class ClusterSynchronizationServiceTest method before.
@Before
public void before() throws Exception {
m_nullMomImplementorSpy = spy(NullMomImplementor.class);
m_beans.add(TestingUtility.registerBean(new BeanMetaData(TestClusterMom.class)));
m_beans.add(TestingUtility.registerBean(new BeanMetaData(NullMomImplementor.class).withProducer(new IBeanInstanceProducer<IMomImplementor>() {
@Override
public IMomImplementor produce(IBean<IMomImplementor> bean) {
return m_nullMomImplementorSpy;
}
})));
// verify that replacement works
assertSame("NullMomImplementor-Spy expected", m_nullMomImplementorSpy, BEANS.get(NullMomImplementor.class));
ClusterNotificationProperties testProps = new ClusterNotificationProperties(TEST_NODE, TEST_USER);
m_message = new ClusterNotificationMessage("notification", testProps);
m_svc = new ClusterSynchronizationService();
m_svc.enable();
}
Aggregations