use of io.joynr.jeeintegration.JeeJoynrServiceLocator in project joynr by bmwcarit.
the class JeeJoynrServiceLocatorTest method testGetNoRuntime.
@Test(expected = IllegalStateException.class)
public void testGetNoRuntime() {
JeeJoynrServiceLocator subject = new JeeJoynrServiceLocator(mock(JoynrIntegrationBean.class));
subject.get(MyServiceSync.class, "local");
}
use of io.joynr.jeeintegration.JeeJoynrServiceLocator in project joynr by bmwcarit.
the class JeeJoynrServiceLocatorTest method setupSubject.
@Before
public void setupSubject() {
when(myJoynrProxy.callMe("one")).thenReturn("two");
when(proxyBuilder.setMessagingQos(Mockito.any())).thenReturn(proxyBuilder);
when(proxyBuilder.setDiscoveryQos(Mockito.any())).thenReturn(proxyBuilder);
when(proxyBuilder.build()).thenReturn(myJoynrProxy);
when(joynrRuntime.getProxyBuilder(Sets.newHashSet("local"), MyServiceProxy.class)).thenReturn(proxyBuilder);
when(joynrIntegrationBean.getRuntime()).thenReturn(joynrRuntime);
subject = new JeeJoynrServiceLocator(joynrIntegrationBean);
}
use of io.joynr.jeeintegration.JeeJoynrServiceLocator in project joynr by bmwcarit.
the class JeeJoynrServiceLocatorTest method testGetNoProxyAvailable.
@Test(expected = IllegalArgumentException.class)
public void testGetNoProxyAvailable() {
JoynrRuntime joynrRuntime = mock(JoynrRuntime.class);
JoynrIntegrationBean joynrIntegrationBean = mock(JoynrIntegrationBean.class);
when(joynrIntegrationBean.getRuntime()).thenReturn(joynrRuntime);
JeeJoynrServiceLocator subject = new JeeJoynrServiceLocator(joynrIntegrationBean);
subject.get(MyInvalidServiceSync.class, "local");
}
Aggregations