@Test public void noHttpData() { doReturn(new TimerData()).when(invocationSequenceData).getTimerData(); String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService); assertThat(values, is(notNullValue())); assertThat(values.length, is(equalTo(0))); } }
return new HttpParameterValueSource(parameterNameText.getText()); case HTTP_URL: return new HttpUrlValueSource(); case IP: return new HostValueSource();
break; case HTTP_URL: expression.setStringValueSource(new HttpUrlValueSource()); break; case HTTP_SCHEME:
@Test public void retrieveURL() { HttpInfo httpInfo = new HttpInfo(); httpInfo.setScheme("http"); httpInfo.setServerName("localhost"); httpInfo.setServerPort(8080); httpInfo.setUri("/test/uri"); httpInfo.setQueryString("test=true"); doReturn(httpTimerData).when(invocationSequenceData).getTimerData(); doReturn(httpInfo).when(httpTimerData).getHttpInfo(); String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService); assertThat(values, hasItemInArray("http://localhost:8080/test/uri?test=true")); }