Package com.google.appengine.tools.development

Examples of com.google.appengine.tools.development.ApiProxyLocal


    Map<String, String> envAttributes = getEnvAttributes();
    if (envAttributes != null) {
      LocalServiceTestHelper.getApiProxyLocal().appendProperties(envAttributes);
    }
    taskQueue = LocalTaskQueueTestConfig.getLocalTaskQueue();
    ApiProxyLocal proxy = (ApiProxyLocal) ApiProxy.getDelegate();
    // Creating files is not allowed in some test execution environments, so don't.
    proxy.setProperty(LocalBlobstoreService.NO_STORAGE_PROPERTY, "true");
  }
View Full Code Here


    return oauthIsAdmin;
  }

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    if (oauthConsumerKey != null) {
      proxy.setProperty(LocalUserService.OAUTH_CONSUMER_KEY_PROPERTY, oauthConsumerKey);
    }
    if (oauthEmail != null) {
      proxy.setProperty(LocalUserService.OAUTH_EMAIL_PROPERTY, oauthEmail);
    }
    if (oauthUserId != null) {
      proxy.setProperty(LocalUserService.OAUTH_USER_ID_PROPERTY, oauthUserId);
    }
    if (oauthAuthDomain != null) {
      proxy.setProperty(LocalUserService.OAUTH_AUTH_DOMAIN_PROPERTY, oauthAuthDomain);
    }
    if (oauthIsAdmin != null) {
      proxy.setProperty(LocalUserService.OAUTH_IS_ADMIN_PROPERTY, Boolean.toString(oauthIsAdmin));
    }
  }
View Full Code Here

    return this;
  }

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    proxy.setProperty(
        LocalTaskQueue.DISABLE_AUTO_TASK_EXEC_PROP, disableAutoTaskExecution.toString());
    if (queueXmlPath != null) {
      proxy.setProperty(LocalTaskQueue.QUEUE_XML_PATH_PROP, queueXmlPath);
    }
    if (callbackClass != null) {
      String callbackName;
      if (!disableAutoTaskExecution) {
        EnvSettingTaskqueueCallback.setProxyProperties(
            proxy, callbackClass, shouldCopyApiProxyEnvironment);
        if (taskExecutionLatch != null) {
          EnvSettingTaskqueueCallback.setTaskExecutionLatch(taskExecutionLatch);
        }
        callbackName = EnvSettingTaskqueueCallback.class.getName();
      } else {
        callbackName = callbackClass.getName();
      }
      proxy.setProperty(LocalTaskQueue.CALLBACK_CLASS_PROP, callbackName);
    }
  }
View Full Code Here

    }
  }

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    proxy.setProperty(LocalDatastoreService.NO_STORAGE_PROPERTY, Boolean.toString(noStorage));
    proxy.setProperty(LocalDatastoreService.AUTO_ID_ALLOCATION_POLICY_PROPERTY,
        autoIdAllocationPolicy.toString());

    if (maxQueryLifetimeMs != null) {
      proxy.setProperty(LocalDatastoreService.MAX_QUERY_LIFETIME_PROPERTY,
          Integer.toString(maxQueryLifetimeMs));
    }

    if (maxTxnLifetimeMs != null) {
      proxy.setProperty(LocalDatastoreService.MAX_TRANSACTION_LIFETIME_PROPERTY,
          Integer.toString(maxTxnLifetimeMs));
    }

    if (storeDelayMs != null) {
      proxy.setProperty(LocalDatastoreService.STORE_DELAY_PROPERTY,
          Integer.toString(storeDelayMs));
    }

    if (backingStoreLocation != null) {
      proxy.setProperty(LocalDatastoreService.BACKING_STORE_PROPERTY, backingStoreLocation);
    }
    proxy.setProperty(LocalDatastoreService.NO_INDEX_AUTO_GEN_PROP,
        Boolean.toString(noIndexAutoGen));
    if (defaultHighRepJobPolicyRandomSeed != null) {
      proxy.setProperty(DefaultHighRepJobPolicy.RANDOM_SEED_PROPERTY,
          Long.toString(defaultHighRepJobPolicyRandomSeed));
    }

    if (defaultHighRepJobPolicyUnappliedJobPercentage != null) {
      proxy.setProperty(DefaultHighRepJobPolicy.UNAPPLIED_JOB_PERCENTAGE_PROPERTY,
          Float.toString(defaultHighRepJobPolicyUnappliedJobPercentage));
    }

    if (alternateHighRepJobPolicyClass != null) {
      proxy.setProperty(LocalDatastoreService.HIGH_REP_JOB_POLICY_CLASS_PROPERTY,
          alternateHighRepJobPolicyClass.getName());
    }
  }
View Full Code Here

  private Long maxSize;
  private SizeUnit maxSizeUnits = SizeUnit.BYTES;

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    if (maxSize != null) {
      proxy.setProperty(
          LocalMemcacheService.SIZE_PROPERTY,
          String.format("%d%s", maxSize, maxSizeUnits.abbreviation));
    }
  }
View Full Code Here

  private String defaultGcsBucketName = null;

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    if (defaultGcsBucketName != null) {
      proxy.setProperty("appengine.default.gcs.bucket.name", defaultGcsBucketName);
    }
  }
View Full Code Here

  private OneGoogleServerProto.OneGoogleService.Stub oneGoogleStub = null;
  private Clock clock = null;

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    proxy.setProperty(LocalBasementService.LOG_TO_SAWMILL_ENABLE_PROPERTY,
        Boolean.toString(logToSawmillEnable));
    proxy.setProperty(LocalBasementService.LOG_TO_SAWMILL_IGNORE_PROPERTY,
        Boolean.toString(logToSawmillIgnore));
    proxy.setProperty(LocalBasementService.LOG_TO_SAWMILL_LOG_EVERY_CALL_PROPERTY,
        Boolean.toString(logToSawmillLogEveryCall));
    proxy.setProperty(LocalBasementService.LOG_TO_SAWMILL_WRITE_FINAL_PROTO_PROPERTY,
        (logToSawmillFinalProtoStream != null ? Boolean.TRUE : Boolean.FALSE).toString());

    if (gaiaMintEmail != null) {
      proxy.setProperty(LocalBasementService.GAIA_MINT_EMAIL_PROPERTY, gaiaMintEmail);
    }
    if (gaiaMintUserId != null) {
      proxy.setProperty(LocalBasementService.GAIA_MINT_USER_ID_PROPERTY, gaiaMintUserId);
    }
    if (gaiaMintAuthDomain != null) {
      proxy.setProperty(LocalBasementService.GAIA_MINT_AUTH_DOMAIN_PROPERTY, gaiaMintAuthDomain);
    }
    if (gaiaMintIsAdmin != null) {
      proxy.setProperty(
          LocalBasementService.GAIA_MINT_IS_ADMIN_PROPERTY, gaiaMintIsAdmin.toString());
    }
    if (gaiaMintGaiaId != null) {
      proxy.setProperty(LocalBasementService.GAIA_MINT_GAIA_ID_PROPERTY, gaiaMintGaiaId.toString());
    }
    if (!gaiaMintAllowedScopes.isEmpty()) {
      proxy.setProperty(LocalBasementService.GAIA_MINT_ALLOWED_SCOPES_PROPERTY,
          Joiner.on(',').join(gaiaMintAllowedScopes));
    }
    if (oneGoogleServerSpec != null) {
      proxy.setProperty(LocalBasementService.ONE_GOOGLE_SERVER_SPEC, oneGoogleServerSpec);
    }

    LocalBasementService localBasementService = getLocalBasementService();
    if (logToSawmillFinalProtoStream != null) {
      localBasementService.injectLogToSawmillOutputStream(logToSawmillFinalProtoStream);
View Full Code Here

  private Boolean logMailBody;
  private Level logMailLevel;

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    if (logMailBody != null) {
      proxy.setProperty(LocalMailService.LOG_MAIL_BODY_PROPERTY, logMailBody.toString());
    }
    if (logMailLevel != null) {
      proxy.setProperty(LocalMailService.LOG_MAIL_LEVEL_PROPERTY, logMailLevel.getName());
    }
  }
View Full Code Here

  Map<String, String> properties = Collections.synchronizedMap(new HashMap<String, String>());

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    proxy.appendProperties(properties);
    LocalCapabilitiesService capabilityService = LocalCapabilitiesServiceTestConfig
        .getLocalCapabilitiesService();
  }
View Full Code Here

  private String user;
  private String password;

  @Override
  public void setUp() {
    ApiProxyLocal proxy = LocalServiceTestHelper.getApiProxyLocal();
    proxy.setProperty(LocalRdbmsProperties.DRIVER_PROPERTY, driverClass);
    proxy.setProperty(LocalRdbmsProperties.JDBC_CONNECTION_URL_STRING_PROPERTY, driverUrl);
    proxy.setProperty(LocalRdbmsService.SERVER_TYPE, serverType.flagValue());
    proxy.setProperty(LocalRdbmsProperties.EXTRA_DRIVER_PROPERTIES_PROPERTY, extraDriverProperties);
    if (remoteClientFactory != null) {
      proxy.setProperty(LocalRdbmsProperties.HOSTED_CLIENT_FACTORY_PROPERTY,
          remoteClientFactory.getName());
    }
    if (database != null) {
      proxy.setProperty(LocalRdbmsProperties.JDBC_CONNECTION_DATABASE_PROPERTY, database);
    }
    if (user != null) {
      proxy.setProperty(LocalRdbmsProperties.JDBC_CONNECTION_USER_PROPERTY, user);
    }
    if (password != null) {
      proxy.setProperty(LocalRdbmsProperties.JDBC_CONNECTION_PASSWORD_PROPERTY, password);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.appengine.tools.development.ApiProxyLocal

Copyright © 2018 www.massapicom. 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.