Package org.jclouds.gae

Source Code of org.jclouds.gae.GaeSocketOpenTest

package org.jclouds.gae;

import org.jclouds.Context;
import org.jclouds.ContextBuilder;
import org.jclouds.gae.config.GoogleAppEngineConfigurationModule;
import org.jclouds.http.IntegrationTestAsyncClient;
import org.jclouds.http.IntegrationTestClient;
import org.jclouds.predicates.SocketOpen;
import org.jclouds.providers.AnonymousProviderMetadata;
import org.testng.annotations.Test;

import com.google.common.collect.ImmutableSet;
import com.google.common.net.HostAndPort;

public class GaeSocketOpenTest {

   @Test(expectedExceptions=UnsupportedOperationException.class)
   public void testSocketOpenThrowsUnsupported() {
      Context context = ContextBuilder.newBuilder(
                  AnonymousProviderMetadata.forClientMappedToAsyncClientOnEndpoint(IntegrationTestClient.class, IntegrationTestAsyncClient.class,
                        "dummyurl"))
            .modules(ImmutableSet.of(new GoogleAppEngineConfigurationModule()))
            .build();

      SocketOpen socketOpen = context.utils().injector().getInstance(SocketOpen.class);
      socketOpen.apply(HostAndPort.fromParts("localhost", 22));
   }
}
TOP

Related Classes of org.jclouds.gae.GaeSocketOpenTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.