All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testobject.rest.api.appium.common.Env Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package org.testobject.rest.api.appium.common;

import java.util.Optional;

public class Env {

	public static final String TESTOBJECT_TEST_LOCALLY = "TESTOBJECT_TEST_LOCALLY";
	public static final String TESTOBJECT_API_ENDPOINT = "TESTOBJECT_API_ENDPOINT";
	public static final String TESTOBJECT_API_KEY = "TESTOBJECT_API_KEY";
	public static final String TESTOBJECT_SUITE_ID = "TESTOBJECT_SUITE_ID";
	public static final String TESTOBJECT_APP_ID = "TESTOBJECT_APP_ID";
	public static final String TESTOBJECT_DEVICE_IDS = "TESTOBJECT_DEVICE_IDS";
	public static final String TESTOBJECT_TIMEOUT = "TESTOBJECT_TIMEOUT";

	public static Optional isTestLocally() {
		return getenv(TESTOBJECT_TEST_LOCALLY);
	}

	public static Optional getApiEndpoint() {
		return getenv(TESTOBJECT_API_ENDPOINT);
	}

	public static Optional getApiKey() {
		return getenv(TESTOBJECT_API_KEY);
	}

	public static Optional getSuiteId() {
		return getenv(TESTOBJECT_SUITE_ID);
	}

	public static Optional getAppId() {
		return getenv(TESTOBJECT_APP_ID);
	}

	public static Optional getDevicesIds() {
		return getenv(TESTOBJECT_DEVICE_IDS);
	}

	public static Optional getTimeout() {
		return getenv(TESTOBJECT_TIMEOUT);
	}


	private static Optional getenv(String key){
		return Optional.ofNullable(System.getenv(key));
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy