use of org.jclouds.io.payloads.StringPayload in project camel by apache.
the class JcloudsBlobStoreConsumerTest method testBlobStoreGetTwoBlobs.
@Test
public void testBlobStoreGetTwoBlobs() throws InterruptedException {
String message1 = "Blob 1";
String message2 = "Blob 2";
MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results", MockEndpoint.class);
mockEndpoint.expectedBodiesReceived(message1, message2);
JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER, TEST_BLOB1, new StringPayload(message1));
JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER, TEST_BLOB2, new StringPayload(message2));
mockEndpoint.assertIsSatisfied();
}
use of org.jclouds.io.payloads.StringPayload in project camel by apache.
the class JcloudsBlobStoreConsumerTest method testBlobStoreWithDirectory.
@Test
public void testBlobStoreWithDirectory() throws InterruptedException {
String message1 = "Blob in directory";
MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results-in-dir", MockEndpoint.class);
mockEndpoint.expectedBodiesReceived(message1);
JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_DIR, new StringPayload(message1));
mockEndpoint.assertIsSatisfied();
}
use of org.jclouds.io.payloads.StringPayload in project camel by apache.
the class JcloudsBlobStoreConsumerTest method testBlobStoreGetOneBlob.
@Test
public void testBlobStoreGetOneBlob() throws InterruptedException {
String message = "Some message";
MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results", MockEndpoint.class);
mockEndpoint.expectedBodiesReceived(message);
JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER, TEST_BLOB1, new StringPayload(message));
mockEndpoint.assertIsSatisfied();
}
use of org.jclouds.io.payloads.StringPayload in project camel by apache.
the class JcloudsBlobStoreConsumerTest method testBlobStoreWithMultipleDirectories.
@Test
public void testBlobStoreWithMultipleDirectories() throws InterruptedException {
String message1 = "Blob in directory";
String message2 = "Blob in other directory";
MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results-in-dir", MockEndpoint.class);
mockEndpoint.expectedBodiesReceived(message1);
JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_DIR, new StringPayload(message1));
JcloudsBlobStoreHelper.writeBlob(blobStore, TEST_CONTAINER_WITH_DIR, TEST_BLOB_IN_OTHER, new StringPayload(message2));
mockEndpoint.assertIsSatisfied();
}
use of org.jclouds.io.payloads.StringPayload in project camel by apache.
the class JcloudsMultipleBlobStoreTest method testWithMultipleServices.
@Test
public void testWithMultipleServices() throws InterruptedException {
String message1 = "Blob 1";
String message2 = "Blob 2";
MockEndpoint mockEndpoint1 = resolveMandatoryEndpoint("mock:results1", MockEndpoint.class);
mockEndpoint1.expectedBodiesReceived(message1);
MockEndpoint mockEndpoint2 = resolveMandatoryEndpoint("mock:results2", MockEndpoint.class);
mockEndpoint2.expectedBodiesReceived(message2);
JcloudsBlobStoreHelper.writeBlob(blobStore1, TEST_CONTAINER, TEST_BLOB1, new StringPayload(message1));
JcloudsBlobStoreHelper.writeBlob(blobStore2, TEST_CONTAINER, TEST_BLOB2, new StringPayload(message2));
mockEndpoint1.assertIsSatisfied();
mockEndpoint2.assertIsSatisfied();
}
Aggregations