Issue 113: signature logger

git-svn-id: http://jclouds.googlecode.com/svn/trunk@2009 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-10-30 20:47:25 +00:00
parent aa6bb89d75
commit 0cf25a1def
1 changed files with 17 additions and 17 deletions

View File

@ -32,6 +32,8 @@ import org.bouncycastle.util.encoders.Base64;
import org.jclouds.atmosonline.saas.handlers.AtmosStorageClientErrorRetryHandler; import org.jclouds.atmosonline.saas.handlers.AtmosStorageClientErrorRetryHandler;
import org.jclouds.atmosonline.saas.handlers.ParseAtmosStorageErrorFromXmlContent; import org.jclouds.atmosonline.saas.handlers.ParseAtmosStorageErrorFromXmlContent;
import org.jclouds.atmosonline.saas.reference.AtmosStorageConstants; import org.jclouds.atmosonline.saas.reference.AtmosStorageConstants;
import org.jclouds.concurrent.WithinThreadExecutorService;
import org.jclouds.concurrent.config.ExecutorServiceModule;
import org.jclouds.http.functions.config.ParserModule; import org.jclouds.http.functions.config.ParserModule;
import org.jclouds.http.handlers.DelegatingErrorHandler; import org.jclouds.http.handlers.DelegatingErrorHandler;
import org.jclouds.http.handlers.DelegatingRetryHandler; import org.jclouds.http.handlers.DelegatingRetryHandler;
@ -51,23 +53,21 @@ import com.google.inject.Injector;
public class AtmosStorageRestClientModuleTest { public class AtmosStorageRestClientModuleTest {
Injector createInjector() { Injector createInjector() {
return Guice.createInjector(new AtmosStorageRestClientModule(), new ParserModule(), return Guice.createInjector(new AtmosStorageRestClientModule(), new ExecutorServiceModule(
new AbstractModule() { new WithinThreadExecutorService()), new ParserModule(), new AbstractModule() {
@Override @Override
protected void configure() { protected void configure() {
bindConstant().annotatedWith( bindConstant().annotatedWith(
Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_ENDPOINT)).to( Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_ENDPOINT)).to(
"http://localhost"); "http://localhost");
bindConstant().annotatedWith( bindConstant().annotatedWith(Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_UID))
Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_UID)).to("uid"); .to("uid");
bindConstant().annotatedWith( bindConstant().annotatedWith(Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_KEY))
Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_KEY)).to( .to(new String(Base64.encode("key".getBytes())));
new String(Base64.encode("key".getBytes()))); bindConstant().annotatedWith(
bindConstant().annotatedWith( Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_SESSIONINTERVAL)).to("2");
Jsr330.named(AtmosStorageConstants.PROPERTY_EMCSAAS_SESSIONINTERVAL)) }
.to("2"); });
}
});
} }
@Test @Test