Search in sources :

Example 6 with DefaulttestProvider

use of joynr.tests.DefaulttestProvider in project joynr by bmwcarit.

the class AbstractBroadcastEnd2EndTest method setupProviderRuntime.

private void setupProviderRuntime(String methodName) throws InterruptedException, ApplicationException {
    Properties factoryPropertiesProvider;
    String channelIdProvider = "JavaTest-" + UUID.randomUUID().getLeastSignificantBits() + "-Provider-BroadcastEnd2EndTest-" + methodName;
    factoryPropertiesProvider = PropertyLoader.loadProperties("testMessaging.properties");
    factoryPropertiesProvider.put(MessagingPropertyKeys.CHANNELID, channelIdProvider);
    factoryPropertiesProvider.put(MessagingPropertyKeys.RECEIVERID, UUID.randomUUID().toString());
    factoryPropertiesProvider.put(AbstractJoynrApplication.PROPERTY_JOYNR_DOMAIN_LOCAL, domain);
    providerRuntime = getRuntime(factoryPropertiesProvider, getSubscriptionPublisherFactoryModule(), new StaticDomainAccessControlProvisioningModule());
    provider = new DefaulttestProvider();
    // .waitForFullRegistration(CONST_DEFAULT_TEST_TIMEOUT);
    Future<Void> voidFuture = providerRuntime.registerProvider(domain, provider, providerQos);
    voidFuture.get(CONST_DEFAULT_TEST_TIMEOUT);
}
Also used : DefaulttestProvider(joynr.tests.DefaulttestProvider) Properties(java.util.Properties) StaticDomainAccessControlProvisioningModule(io.joynr.accesscontrol.StaticDomainAccessControlProvisioningModule)

Example 7 with DefaulttestProvider

use of joynr.tests.DefaulttestProvider in project joynr by bmwcarit.

the class RequestInterpreterTest method setup.

@Before
public void setup() {
    RequestCallerFactory requestCallerFactory = new RequestCallerFactory();
    requestCaller = requestCallerFactory.create(new DefaulttestProvider());
    subject = new RequestInterpreter(joynrMessageScope, joynrMessageCreatorProvider, joynrMessageContextProvider);
    request = new OneWayRequest("getTestAttribute", new Object[0], new Class[0]);
    request.setCreatorUserId("creator");
    Mockito.when(joynrMessageCreatorProvider.get()).thenReturn(joynrMessageCreator);
    Mockito.when(joynrMessageContextProvider.get()).thenReturn(joynrMessageContext);
}
Also used : OneWayRequest(joynr.OneWayRequest) DefaulttestProvider(joynr.tests.DefaulttestProvider) RequestCallerFactory(io.joynr.dispatching.RequestCallerFactory) Before(org.junit.Before)

Aggregations

DefaulttestProvider (joynr.tests.DefaulttestProvider)7 Properties (java.util.Properties)4 ProviderQos (joynr.types.ProviderQos)3 Before (org.junit.Before)3 Test (org.junit.Test)3 StaticDomainAccessControlProvisioningModule (io.joynr.accesscontrol.StaticDomainAccessControlProvisioningModule)2 DiscoveryQos (io.joynr.arbitration.DiscoveryQos)2 MessagingQos (io.joynr.messaging.MessagingQos)2 Module (com.google.inject.Module)1 RequestCallerFactory (io.joynr.dispatching.RequestCallerFactory)1 TestGlobalAddressModule (io.joynr.messaging.routing.TestGlobalAddressModule)1 JoynrProvider (io.joynr.provider.JoynrProvider)1 CCInProcessRuntimeModule (io.joynr.runtime.CCInProcessRuntimeModule)1 JoynrInjectorFactory (io.joynr.runtime.JoynrInjectorFactory)1 JoynrRuntime (io.joynr.runtime.JoynrRuntime)1 OneWayRequest (joynr.OneWayRequest)1 joynr.tests.testProxy (joynr.tests.testProxy)1 joynr.tests.testSubscriptionPublisherImpl (joynr.tests.testSubscriptionPublisherImpl)1