Search in sources :

Example 1 with TestPublish

use of org.commonjava.maven.galley.testing.core.transport.job.TestPublish in project galley by Commonjava.

the class TestTransport method createPublishJob.

@Override
public PublishJob createPublishJob(final ConcreteResource resource, final InputStream stream, final long length, final String contentType, final int timeoutSeconds) throws TransferException {
    final TestPublish job = publishes.get(resource);
    if (job == null) {
        throw new TransferException("No publish job registered for: {}", resource);
    }
    job.setContent(stream, length, contentType);
    return job;
}
Also used : TransferException(org.commonjava.maven.galley.TransferException) TestPublish(org.commonjava.maven.galley.testing.core.transport.job.TestPublish)

Aggregations

TransferException (org.commonjava.maven.galley.TransferException)1 TestPublish (org.commonjava.maven.galley.testing.core.transport.job.TestPublish)1