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

org.testobject.appium.common.AppiumSuiteResource Maven / Gradle / Ivy

There is a newer version: 0.2.7
Show newest version
package org.testobject.appium.common;

import com.sun.jersey.api.client.GenericType;
import org.testobject.appium.common.data.Suite;
import org.testobject.appium.internal.RestClient;

import javax.ws.rs.core.MediaType;
import java.util.Set;

public class AppiumSuiteResource {

	private final RestClient client;

	public AppiumSuiteResource(RestClient client) {
		this.client = client;
	}

	public Set readSuiteDeviceIds(long suiteId) {
		return client
				.path("suites").path(Long.toString(suiteId))
				.path("deviceIds")
				.type(MediaType.APPLICATION_JSON_TYPE)
				.get(new GenericType>(Set.class));
	}

	public Suite updateSuite(Suite.Id suiteId, Suite suite) {
		return client
				.path("suites").path(suiteId.toString())
				.type(MediaType.APPLICATION_JSON_TYPE)
				.put(Suite.class, suite);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy