ClickModifier extends WebElementsLocatorParams implements CollectorJob { @Override public void setParameters(final Map<String, String> params) throws ParametersException { setElementParams(params); } ClickModifier(final WebDriver webDriver); @Override CollectorStepResult collect(); @Override void setParameters(final Map<String, String> params); static final String NAME; }
@Test public void setParameters_whenValidXpathParamIsProvided_thenValidationPassedSuccessfuly() throws ParametersException { setupParams(PARAM_TIMEOUT_VALUE, PARAM_XPATH_VALUE, null); tested.setParameters(params); }
@Test public void setParameters_whenValidCSSParamIsProvided_thenValidationPassedSuccessfuly() throws ParametersException { setupParams(PARAM_TIMEOUT_VALUE, null, PARAM_CSS_VALUE); tested.setParameters(params); }
@Test(expected = ParametersException.class) public void setParameters_whenInvalidTimeoutParamIsProvided_thenExceptionIsThrown() throws ParametersException { setupParams("xyz", PARAM_XPATH_VALUE, null); tested.setParameters(params); }
@Test(expected = ParametersException.class) public void setParameters_whenInvalidXpathParamIsProvided_thenExceptionIsThrown() throws ParametersException { setupParams(PARAM_TIMEOUT_VALUE, "", null); tested.setParameters(params); }
@Test(expected = ParametersException.class) public void setParameters_whenNoParamsIsProvided_thenExceptionIsThrown() throws ParametersException { setupParams(PARAM_TIMEOUT_VALUE, null, null); tested.setParameters(params); }