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

au.com.agic.apptesting.State Maven / Gradle / Ivy

package au.com.agic.apptesting;

import au.com.agic.apptesting.constants.Constants;
import au.com.agic.apptesting.utils.SystemPropertyUtils;
import au.com.agic.apptesting.utils.ThreadWebDriverMap;
import au.com.agic.apptesting.utils.impl.LocalThreadWebDriverMapImpl;
import au.com.agic.apptesting.utils.impl.SystemPropertyUtilsImpl;
import au.com.agic.apptesting.utils.impl.ThreadWebDriverMapImpl;

/**
 * Maintains the state of the system. Threads will call into this state to get their connection
 * information.
 */
public final class State {

	public static final ThreadWebDriverMap THREAD_DESIRED_CAPABILITY_MAP;
	private static final SystemPropertyUtils SYSTEM_PROPERTY_UTILS = new SystemPropertyUtilsImpl();

	static {
		/*
			Select the location of the tests based on the system property
		 */
		THREAD_DESIRED_CAPABILITY_MAP = Constants.REMOTE_TESTS.equalsIgnoreCase(
			SYSTEM_PROPERTY_UTILS.getProperty(Constants.TEST_DESTINATION_SYSTEM_PROPERTY))
			? new ThreadWebDriverMapImpl()
			: new LocalThreadWebDriverMapImpl();
	}

	private State() {
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy