fixed demos after stub was renamed

This commit is contained in:
Adrian Cole 2010-03-15 12:25:42 -07:00
parent 3be3966f45
commit 983801ceb0
8 changed files with 18 additions and 18 deletions

View File

@ -26,8 +26,8 @@ import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.domain.StoredTweetStatus;
import org.jclouds.demo.tweetstore.functions.ServiceToStoredTweetStatuses;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
@ -49,7 +49,7 @@ public class AddTweetsControllerTest {
ExecutionException {
Map<String, BlobStoreContext> services = Maps.newHashMap();
for (String name : new String[] { "1", "2" }) {
BlobStoreContext context = new StubBlobStoreContextBuilder().buildBlobStoreContext();
BlobStoreContext context = new TransientBlobStoreContextBuilder().buildBlobStoreContext();
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");

View File

@ -30,8 +30,8 @@ import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobMap;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
import org.jclouds.twitter.TwitterClient;
import org.jclouds.twitter.domain.Status;
@ -56,8 +56,8 @@ public class StoreTweetsControllerTest {
Map<String, BlobStoreContext> createBlobStores() throws InterruptedException, ExecutionException {
Map<String, BlobStoreContext> contexts = ImmutableMap.<String, BlobStoreContext> of("test1",
new StubBlobStoreContextBuilder().buildBlobStoreContext(), "test2",
new StubBlobStoreContextBuilder().buildBlobStoreContext());
new TransientBlobStoreContextBuilder().buildBlobStoreContext(), "test2",
new TransientBlobStoreContextBuilder().buildBlobStoreContext());
for (BlobStoreContext blobstore : contexts.values()) {
blobstore.getAsyncBlobStore().createContainerInLocation(null, "favo").get();
}

View File

@ -25,8 +25,8 @@ import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobMap;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.domain.StoredTweetStatus;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
import org.testng.annotations.Test;
@ -40,7 +40,7 @@ import org.testng.annotations.Test;
public class KeyToStoredTweetStatusTest {
BlobMap createMap() throws InterruptedException, ExecutionException {
BlobStoreContext context = new StubBlobStoreContextBuilder().buildBlobStoreContext();
BlobStoreContext context = new TransientBlobStoreContextBuilder().buildBlobStoreContext();
context.getBlobStore().createContainerInLocation(null, "test1");
return context.createBlobMap("test1");
}

View File

@ -25,8 +25,8 @@ import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.domain.StoredTweetStatus;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
import org.testng.annotations.Test;
@ -46,7 +46,7 @@ public class ServiceToStoredTweetStatusesTest {
ExecutionException {
Map<String, BlobStoreContext> services = Maps.newHashMap();
for (String name : new String[] { "1", "2" }) {
BlobStoreContext context = new StubBlobStoreContextBuilder().buildBlobStoreContext();
BlobStoreContext context = new TransientBlobStoreContextBuilder().buildBlobStoreContext();
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");

View File

@ -26,8 +26,8 @@ import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.domain.StoredTweetStatus;
import org.jclouds.demo.tweetstore.functions.ServiceToStoredTweetStatuses;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
@ -49,7 +49,7 @@ public class AddTweetsControllerTest {
ExecutionException {
Map<String, BlobStoreContext> services = Maps.newHashMap();
for (String name : new String[] { "1", "2" }) {
BlobStoreContext context = new StubBlobStoreContextBuilder().buildBlobStoreContext();
BlobStoreContext context = new TransientBlobStoreContextBuilder().buildBlobStoreContext();
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");

View File

@ -30,8 +30,8 @@ import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobMap;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
import org.jclouds.twitter.TwitterClient;
import org.jclouds.twitter.domain.Status;
@ -56,8 +56,8 @@ public class StoreTweetsControllerTest {
Map<String, BlobStoreContext> createBlobStores() throws InterruptedException, ExecutionException {
Map<String, BlobStoreContext> contexts = ImmutableMap.<String, BlobStoreContext> of("test1",
new StubBlobStoreContextBuilder().buildBlobStoreContext(), "test2",
new StubBlobStoreContextBuilder().buildBlobStoreContext());
new TransientBlobStoreContextBuilder().buildBlobStoreContext(), "test2",
new TransientBlobStoreContextBuilder().buildBlobStoreContext());
for (BlobStoreContext blobstore : contexts.values()) {
blobstore.getAsyncBlobStore().createContainerInLocation(null, "favo").get();
}

View File

@ -25,8 +25,8 @@ import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobMap;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.domain.StoredTweetStatus;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
import org.testng.annotations.Test;
@ -40,7 +40,7 @@ import org.testng.annotations.Test;
public class KeyToStoredTweetStatusTest {
BlobMap createMap() throws InterruptedException, ExecutionException {
BlobStoreContext context = new StubBlobStoreContextBuilder().buildBlobStoreContext();
BlobStoreContext context = new TransientBlobStoreContextBuilder().buildBlobStoreContext();
context.getBlobStore().createContainerInLocation(null, "test1");
return context.createBlobMap("test1");
}

View File

@ -25,8 +25,8 @@ import java.util.Map;
import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.blobstore.TransientBlobStoreContextBuilder;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.integration.StubBlobStoreContextBuilder;
import org.jclouds.demo.tweetstore.domain.StoredTweetStatus;
import org.jclouds.demo.tweetstore.reference.TweetStoreConstants;
import org.testng.annotations.Test;
@ -46,7 +46,7 @@ public class ServiceToStoredTweetStatusesTest {
ExecutionException {
Map<String, BlobStoreContext> services = Maps.newHashMap();
for (String name : new String[] { "1", "2" }) {
BlobStoreContext context = new StubBlobStoreContextBuilder().buildBlobStoreContext();
BlobStoreContext context = new TransientBlobStoreContextBuilder().buildBlobStoreContext();
context.getAsyncBlobStore().createContainerInLocation(null, container).get();
Blob blob = context.getAsyncBlobStore().newBlob("1");
blob.getMetadata().getUserMetadata().put(TweetStoreConstants.SENDER_NAME, "frank");