use of org.apache.sling.jcr.api.SlingRepository in project sling by apache.
the class ImportingDistributionPackageProcessorTest method testGetAllResponses.
@Test
public void testGetAllResponses() throws Exception {
DistributionPackageImporter importer = mock(DistributionPackageImporter.class);
SlingRepository repository = mock(SlingRepository.class);
String agentService = "agentService";
ResourceResolverFactory resourceResolverFactory = mock(ResourceResolverFactory.class);
String subServiceName = "ssn";
SimpleDistributionAgentAuthenticationInfo authInfo = new SimpleDistributionAgentAuthenticationInfo(repository, agentService, resourceResolverFactory, subServiceName);
String callingUser = "foo";
String requestId = "123";
DefaultDistributionLog log = mock(DefaultDistributionLog.class);
ImportingDistributionPackageProcessor processor = new ImportingDistributionPackageProcessor(importer, authInfo, callingUser, requestId, log);
assertNotNull(processor.getAllResponses());
assertTrue(processor.getAllResponses().isEmpty());
}
use of org.apache.sling.jcr.api.SlingRepository in project sling by apache.
the class ImportingDistributionPackageProcessorTest method testGetPackagesCount.
@Test
public void testGetPackagesCount() throws Exception {
DistributionPackageImporter importer = mock(DistributionPackageImporter.class);
SlingRepository repository = mock(SlingRepository.class);
String agentService = "agentService";
ResourceResolverFactory resourceResolverFactory = mock(ResourceResolverFactory.class);
String subServiceName = "ssn";
SimpleDistributionAgentAuthenticationInfo authInfo = new SimpleDistributionAgentAuthenticationInfo(repository, agentService, resourceResolverFactory, subServiceName);
String callingUser = "foo";
String requestId = "123";
DefaultDistributionLog log = mock(DefaultDistributionLog.class);
ImportingDistributionPackageProcessor processor = new ImportingDistributionPackageProcessor(importer, authInfo, callingUser, requestId, log);
assertEquals(0, processor.getPackagesCount());
}
use of org.apache.sling.jcr.api.SlingRepository in project sling by apache.
the class ImportingDistributionPackageProcessorTest method testGetPackagesSize.
@Test
public void testGetPackagesSize() throws Exception {
DistributionPackageImporter importer = mock(DistributionPackageImporter.class);
SlingRepository repository = mock(SlingRepository.class);
String agentService = "agentService";
ResourceResolverFactory resourceResolverFactory = mock(ResourceResolverFactory.class);
String subServiceName = "ssn";
SimpleDistributionAgentAuthenticationInfo authInfo = new SimpleDistributionAgentAuthenticationInfo(repository, agentService, resourceResolverFactory, subServiceName);
String callingUser = "foo";
String requestId = "123";
DefaultDistributionLog log = mock(DefaultDistributionLog.class);
ImportingDistributionPackageProcessor processor = new ImportingDistributionPackageProcessor(importer, authInfo, callingUser, requestId, log);
assertEquals(0, processor.getPackagesSize());
}
Aggregations