use of org.eclipse.scout.rt.server.services.common.clustersync.internal.ClusterNotificationProperties in project scout.rt by eclipse.
the class ClusterSynchronizationService method getNotificationProperties.
@Override
public IClusterNotificationProperties getNotificationProperties() {
ISession curentSession = ISession.CURRENT.get();
String userid = curentSession != null ? curentSession.getUserId() : "";
return new ClusterNotificationProperties(m_nodeId, userid);
}
use of org.eclipse.scout.rt.server.services.common.clustersync.internal.ClusterNotificationProperties in project scout.rt by eclipse.
the class ClusterNodeStatusInfoTest method setup.
@Before
public void setup() {
m_message = mock(ClusterNotificationMessage.class);
when(m_message.getProperties()).thenReturn(new ClusterNotificationProperties(TEST_NODE, TEST_USER));
}
use of org.eclipse.scout.rt.server.services.common.clustersync.internal.ClusterNotificationProperties 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