@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 HttpQueryStringValueSource(); case HTTP_SCHEME: return new HttpSchemeValueSource(); case HTTP_SERVER_NAME: return new HttpServerNameValueSource();
break; case HTTP_SCHEME: expression.setStringValueSource(new HttpSchemeValueSource()); break; case HTTP_SERVER_NAME:
@Test public void retrieveScheme() { HttpInfo httpInfo = new HttpInfo(); httpInfo.setScheme("https"); doReturn(httpTimerData).when(invocationSequenceData).getTimerData(); doReturn(httpInfo).when(httpTimerData).getHttpInfo(); String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService); assertThat(values, hasItemInArray("https")); }