use of org.opencastproject.serviceregistry.api.HostRegistrationInMemory in project opencast by opencast.
the class YouTubeV3PublicationServiceImplTest method before.
@Before
public void before() throws Exception {
youTubeService = createMock(YouTubeAPIVersion3Service.class);
youTubeService.initialize(anyObject(ClientCredentials.class));
expectLastCall();
orgDirectory = createMock(OrganizationDirectoryService.class);
security = createMock(SecurityService.class);
registry = createMock(ServiceRegistry.class);
List<HostRegistration> hosts = new LinkedList<HostRegistration>();
HostRegistration host = new HostRegistrationInMemory("localhost", "localhost", 1.0F, 1, 1024L);
hosts.add(host);
expect(registry.getHostRegistrations()).andReturn(hosts).anyTimes();
userDirectoryService = createMock(UserDirectoryService.class);
workspace = createMock(Workspace.class);
//
service = new YouTubeV3PublicationServiceImpl(youTubeService);
service.setOrganizationDirectoryService(orgDirectory);
service.setSecurityService(security);
service.setServiceRegistry(registry);
service.setUserDirectoryService(userDirectoryService);
service.setWorkspace(workspace);
}
Aggregations