作者:星浪列兵_505_325 | 来源:互联网 | 2023-07-24 02:45
本文整理了Java中rocks.inspectit.shared.all.communication.data.HttpInfo.()
方法的一些代码示例,展示了HttpInfo.()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpInfo.()
方法的具体详情如下:
包路径:rocks.inspectit.shared.all.communication.data.HttpInfo
类名称:HttpInfo
方法名:
HttpInfo.介绍
[英]No-arg constructors.
[中]没有参数构造函数。
代码示例
代码示例来源:origin: inspectIT/inspectIT
return (HttpInfo) httpInfoList.get(0);
} else {
return new HttpInfo(uri, requestMethod, tag);
代码示例来源:origin: inspectIT/inspectIT
@Test
public void retrieveURI() {
HttpInfo httpInfo = new HttpInfo("/test/uri", "POST", null);
doReturn(httpTimerData).when(invocationSequenceData).getTimerData();
doReturn(httpInfo).when(httpTimerData).getHttpInfo();
String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService);
assertThat(values, hasItemInArray("/test/uri"));
}
代码示例来源:origin: inspectIT/inspectIT
@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"));
}
代码示例来源:origin: inspectIT/inspectIT
@Test
public void retrieveServerName() {
HttpInfo httpInfo = new HttpInfo();
httpInfo.setServerName("localhost");
doReturn(httpTimerData).when(invocationSequenceData).getTimerData();
doReturn(httpInfo).when(httpTimerData).getHttpInfo();
String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService);
assertThat(values, hasItemInArray("localhost"));
}
代码示例来源:origin: inspectIT/inspectIT
@Test
public void retrieveQueryString() {
HttpInfo httpInfo = new HttpInfo();
httpInfo.setQueryString("test=true");
doReturn(httpTimerData).when(invocationSequenceData).getTimerData();
doReturn(httpInfo).when(httpTimerData).getHttpInfo();
String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService);
assertThat(values, hasItemInArray("test=true"));
}
代码示例来源:origin: inspectIT/inspectIT
@Test
public void retrieveRequestMethod() {
HttpInfo httpInfo = new HttpInfo();
httpInfo.setRequestMethod("POST");
doReturn(httpTimerData).when(invocationSequenceData).getTimerData();
doReturn(httpInfo).when(httpTimerData).getHttpInfo();
String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService);
assertThat(values, hasItemInArray("POST"));
}
代码示例来源:origin: inspectIT/inspectIT
@Test
public void retrieveServerPort() {
HttpInfo httpInfo = new HttpInfo();
httpInfo.setServerPort(8080);
doReturn(httpTimerData).when(invocationSequenceData).getTimerData();
doReturn(httpInfo).when(httpTimerData).getHttpInfo();
String[] values = valueSource.getStringValues(invocationSequenceData, cachedDataService);
assertThat(values, hasItemInArray("8080"));
}
代码示例来源:origin: inspectIT/inspectIT
@Test
private void musteReturnAnObjectWithAPairLongStringIfTheTimerDataHasHttpTimerData() {
InvocationSequenceData invocatiOnSequenceData= new InvocationSequenceData(new Timestamp(10L), 10L, 20L, 108L);
HttpTimerData timerData = new HttpTimerData(new Timestamp(10), 10, 10, 108L);
HttpInfo httpInfo = new HttpInfo("URI", "requestMethod", "headerValue");
timerData.setHttpInfo(httpInfo);
invocationSequenceData.setTimerData(timerData);
Pair aggregatiOnKey= (Pair) DiagnosisDataAggregator.getInstance().getAggregationKey(invocationSequenceData);
assertThat("The string of the pair must be the sql data", aggregationKey.getSecond(), is(timerData.getHttpInfo().getUri()));
}
代码示例来源:origin: inspectIT/inspectIT
@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"));
}
代码示例来源:origin: inspectIT/inspectIT
@Test
private void ifTheAggregatedObjectHasHttpTimerDataAndIsDefinedInTheMapItMustBeAggregatedToTheDiagnosisAggregator() {
InvocationSequenceData invocatiOnSequenceData= new InvocationSequenceData(new Timestamp(10L), 10L, 20L, 2L);
diagnosisDataAggregatiOnPerformer= new DiagnosisDataAggregationPerformer();
HttpTimerData timerData = new HttpTimerData(new Timestamp(10), 10, 10, 108L);
HttpInfo httpInfo = new HttpInfo("URI", "requestMethod", "headerValue");
timerData.setHttpInfo(httpInfo);
invocationSequenceData.setTimerData(timerData);
Object key = new Pair(invocationSequenceData.getMethodIdent(), ((HttpTimerData) invocationSequenceData.getTimerData()).getHttpInfo().getUri());
diagnosisDataAggregationPerformer.diagnosisDataAggregationMap.put(key, alreadyAggregatedObject);
diagnosisDataAggregationPerformer.aggregateInvocationSequenceData(invocationSequenceData);
verify(alreadyAggregatedObject, times(1)).aggregate(invocationSequenceData);
}
}