use of io.joynr.proxy.ProxyBuilderFactoryImpl in project joynr by bmwcarit.
the class LocalDomainAccessControllerTest method setup.
@SuppressWarnings("unchecked")
@Before
public void setup() {
cacheManager = CacheManager.create();
domainAccessControlStore = new DomainAccessControlStoreEhCache(cacheManager, new DefaultDomainAccessControlProvisioning());
when(proxyInvocationHandlerFactoryMock.create(any(Set.class), any(String.class), any(String.class), any(DiscoveryQos.class), any(MessagingQos.class))).thenReturn(proxyInvocationHandlerMock);
GlobalDiscoveryEntry accessControlDomain = mock(GlobalDiscoveryEntry.class);
when(accessControlDomain.getDomain()).thenReturn("accessControlDomain");
localDomainAccessController = new LocalDomainAccessControllerImpl(accessControlDomain, domainAccessControlStore, new ProxyBuilderFactoryImpl(localDiscoveryAggregator, proxyInvocationHandlerFactoryMock, MAX_TTL, DISCOVERY_TIMEOUT_MS, RETRY_INTERVAL_MS), "systemServiceDomain");
// instantiate some template objects
userDre = new DomainRoleEntry(UID1, new String[] { DOMAIN1 }, Role.OWNER);
masterAce = new MasterAccessControlEntry(UID1, DOMAIN1, INTERFACE1, TrustLevel.LOW, new TrustLevel[] { TrustLevel.MID, TrustLevel.LOW }, TrustLevel.LOW, new TrustLevel[] { TrustLevel.MID, TrustLevel.LOW }, OPEARATION1, Permission.NO, new Permission[] { Permission.ASK, Permission.NO });
ownerAce = new OwnerAccessControlEntry(UID1, DOMAIN1, INTERFACE1, TrustLevel.LOW, TrustLevel.LOW, OPEARATION1, Permission.YES);
}
Aggregations