use of io.joynr.messaging.MessagingTestModule in project joynr by bmwcarit.
the class UrlResolverTest method setUp.
@Before
public void setUp() throws Exception {
Properties properties = new Properties();
properties.put(MessagingPropertyKeys.CHANNELID, channelId);
Injector injector = Guice.createInjector(new JoynrPropertiesModule(properties), new MessagingTestModule(), new AtmosphereMessagingModule(), new AbstractModule() {
@Override
protected void configure() {
bind(RequestConfig.class).toProvider(HttpDefaultRequestConfigProvider.class).in(Singleton.class);
bind(MessageRouter.class).toInstance(mockMessageRouter);
Multibinder.newSetBinder(binder(), new TypeLiteral<JoynrMessageProcessor>() {
});
}
});
urlResolver = injector.getInstance(UrlResolver.class);
}
use of io.joynr.messaging.MessagingTestModule in project joynr by bmwcarit.
the class HttpCommunicationManagerTest method setUp.
@Before
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification = "correct use of RestAssured API")
public void setUp() throws Exception {
RestAssured.port = port;
String basePath = "/bounceproxy/";
RestAssured.basePath = basePath;
bounceProxyUrlString = "http://localhost:" + port + basePath;
Properties properties = new Properties();
properties.put(MessagingPropertyKeys.CHANNELID, testChannelId);
properties.put(MessagingPropertyKeys.BOUNCE_PROXY_URL, bounceProxyUrlString);
Injector injector = Guice.createInjector(new JoynrPropertiesModule(properties), new MessagingTestModule(), new AtmosphereMessagingModule(), new AbstractModule() {
@Override
protected void configure() {
bind(RequestConfig.class).toProvider(HttpDefaultRequestConfigProvider.class).in(Singleton.class);
bind(MessageRouter.class).toInstance(mockMessageRouter);
Multibinder.newSetBinder(binder(), new TypeLiteral<JoynrMessageProcessor>() {
});
}
});
longpollingMessageReceiver = injector.getInstance(LongPollingMessageReceiver.class);
}
Aggregations