- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中okreplay.YamlRecordedInteraction.toImmutable()
方法的一些代码示例,展示了YamlRecordedInteraction.toImmutable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlRecordedInteraction.toImmutable()
方法的具体详情如下:
包路径:okreplay.YamlRecordedInteraction
类名称:YamlRecordedInteraction
方法名:toImmutable
暂无
代码示例来源:origin: com.airbnb.okreplay/okreplay
@Override public boolean apply(YamlRecordedInteraction input) {
return matchRule.isMatch(request, input.toImmutable().request());
}
});
代码示例来源:origin: airbnb/okreplay
@Override public boolean apply(YamlRecordedInteraction input) {
return matchRule.isMatch(request, input.toImmutable().request());
}
});
代码示例来源:origin: airbnb/okreplay
@Override public Response play(final Request request) {
if (!mode.isReadable()) {
throw new IllegalStateException("the tape is not readable");
}
if (mode.isSequential()) {
Integer nextIndex = orderedIndex.getAndIncrement();
RecordedInteraction nextInteraction = interactions.get(nextIndex).toImmutable();
if (nextInteraction == null) {
throw new IllegalStateException(String.format("No recording found at position %s",
nextIndex));
}
if (!matchRule.isMatch(request, nextInteraction.request())) {
throw new IllegalStateException(String.format("Request %s does not match recorded " +
"request" + " %s", stringify(request), stringify(nextInteraction.request())));
}
return nextInteraction.response();
} else {
int position = findMatch(request);
if (position < 0) {
throw new IllegalStateException("no matching recording found");
} else {
return interactions.get(position).toImmutable().response();
}
}
}
代码示例来源:origin: com.airbnb.okreplay/okreplay
@Override public Response play(final Request request) {
if (!mode.isReadable()) {
throw new IllegalStateException("the tape is not readable");
}
if (mode.isSequential()) {
Integer nextIndex = orderedIndex.getAndIncrement();
RecordedInteraction nextInteraction = interactions.get(nextIndex).toImmutable();
if (nextInteraction == null) {
throw new IllegalStateException(String.format("No recording found at position %s",
nextIndex));
}
if (!matchRule.isMatch(request, nextInteraction.request())) {
throw new IllegalStateException(String.format("Request %s does not match recorded " +
"request" + " %s", stringify(request), stringify(nextInteraction.request())));
}
return nextInteraction.response();
} else {
int position = findMatch(request);
if (position < 0) {
throw new IllegalStateException("no matching recording found");
} else {
return interactions.get(position).toImmutable().response();
}
}
}
代码示例来源:origin: airbnb/okreplay
@Override public boolean seek(Request request) {
if (isSequential()) {
try {
// TODO: it's a complete waste of time using an AtomicInteger when this method is called
// before play in a non-transactional way
Integer index = orderedIndex.get();
RecordedInteraction interaction = interactions.get(index).toImmutable();
Request nextRequest = interaction == null ? null : interaction.request();
return nextRequest != null && matchRule.isMatch(request, nextRequest);
} catch (IndexOutOfBoundsException e) {
throw new NonWritableTapeException();
}
} else {
return findMatch(request) >= 0;
}
}
代码示例来源:origin: com.airbnb.okreplay/okreplay
@Override public boolean seek(Request request) {
if (isSequential()) {
try {
// TODO: it's a complete waste of time using an AtomicInteger when this method is called
// before play in a non-transactional way
Integer index = orderedIndex.get();
RecordedInteraction interaction = interactions.get(index).toImmutable();
Request nextRequest = interaction == null ? null : interaction.request();
return nextRequest != null && matchRule.isMatch(request, nextRequest);
} catch (IndexOutOfBoundsException e) {
throw new NonWritableTapeException();
}
} else {
return findMatch(request) >= 0;
}
}
本文整理了Java中okreplay.YamlRecordedResponse.toImmutable()方法的一些代码示例,展示了YamlRecordedResponse.toImmutable()
本文整理了Java中okreplay.YamlRecordedRequest.toImmutable()方法的一些代码示例,展示了YamlRecordedRequest.toImmutable()的具
本文整理了Java中okreplay.YamlRecordedInteraction.toImmutable()方法的一些代码示例,展示了YamlRecordedInteraction.toImmut
我是一名优秀的程序员,十分优秀!