use of com.google.container.v1beta1.Location in project java-container by googleapis.
the class ClusterManagerClientTest method listLocationsTest.
@Test
public void listLocationsTest() throws Exception {
ListLocationsResponse expectedResponse = ListLocationsResponse.newBuilder().addAllLocations(new ArrayList<Location>()).setNextPageToken("nextPageToken-1386094857").build();
mockClusterManager.addResponse(expectedResponse);
String parent = "parent-995424086";
ListLocationsResponse actualResponse = client.listLocations(parent);
Assert.assertEquals(expectedResponse, actualResponse);
List<AbstractMessage> actualRequests = mockClusterManager.getRequests();
Assert.assertEquals(1, actualRequests.size());
ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0));
Assert.assertEquals(parent, actualRequest.getParent());
Assert.assertTrue(channelProvider.isHeaderSent(ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}
use of com.google.container.v1beta1.Location in project selenium-webdriver-java by bonigarcia.
the class LocationContextSelJupTest method testLocationContext.
@Test
void testLocationContext(ChromeDriver driver) {
LocationContext location = (LocationContext) driver;
location.setLocation(new Location(27.5916, 86.5640, 8850));
driver.get("https://bonigarcia.dev/selenium-webdriver-java/geolocation.html");
driver.findElement(By.id("get-coordinates")).click();
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
WebElement coordinates = driver.findElement(By.id("coordinates"));
wait.until(ExpectedConditions.visibilityOf(coordinates));
}
use of com.google.container.v1beta1.Location in project selenium-webdriver-java by bonigarcia.
the class LocationContextJUnit4Test method testLocationContext.
@Test
public void testLocationContext() {
LocationContext location = (LocationContext) driver;
location.setLocation(new Location(27.5916, 86.5640, 8850));
driver.get("https://bonigarcia.dev/selenium-webdriver-java/geolocation.html");
driver.findElement(By.id("get-coordinates")).click();
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
WebElement coordinates = driver.findElement(By.id("coordinates"));
wait.until(ExpectedConditions.visibilityOf(coordinates));
}
use of com.google.container.v1beta1.Location in project selenium-webdriver-java by bonigarcia.
the class LocationContextJupiterTest method testLocationContext.
@Test
void testLocationContext() {
LocationContext location = (LocationContext) driver;
location.setLocation(new Location(27.5916, 86.5640, 8850));
driver.get("https://bonigarcia.dev/selenium-webdriver-java/geolocation.html");
driver.findElement(By.id("get-coordinates")).click();
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
WebElement coordinates = driver.findElement(By.id("coordinates"));
wait.until(ExpectedConditions.visibilityOf(coordinates));
}
Aggregations