use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testGetApplicationIdWithoutToken.
/**
* Check tokens are not added to request when not provided
* @throws UnirestException
*/
@Test(groups = { "ut" })
public void testGetApplicationIdWithoutToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", null);
Assert.assertEquals(connector.getApplicationId(), 1);
verify(namedApplicationRequest, never()).header(eq("Authorization"), anyString());
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testGetEnvironmentIdWithToken.
/**
* Check tokens are not added to request when not provided
* @throws UnirestException
*/
@Test(groups = { "ut" })
public void testGetEnvironmentIdWithToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", "123");
Assert.assertEquals(connector.getEnvironmentId(), 2);
verify(namedEnvironmentRequest, times(1)).header("Authorization", "Token 123");
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testCreateApplicationWithoutToken.
/**
* Check tokens are not added to request when not provided
* @throws UnirestException
*/
@Test(groups = { "ut" })
public void testCreateApplicationWithoutToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", null);
connector.createApplication();
verify(createApplicationRequest, never()).header(eq("Authorization"), anyString());
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testGetVersionIdWithoutToken.
/**
* Check tokens are not added to request when not provided
* @throws UnirestException
*/
@Test(groups = { "ut" })
public void testGetVersionIdWithoutToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", null);
Assert.assertEquals(connector.getVersionId(), 4);
verify(namedVersionRequest, never()).header(eq("Authorization"), anyString());
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testGetEnvironmentIdWithoutToken.
/**
* Check tokens are not added to request when not provided
* @throws UnirestException
*/
@Test(groups = { "ut" })
public void testGetEnvironmentIdWithoutToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", null);
Assert.assertEquals(connector.getEnvironmentId(), 2);
verify(namedEnvironmentRequest, never()).header(eq("Authorization"), anyString());
}
Aggregations