gpt4 book ai didi

com.epam.wilma.domain.sequence.WilmaSequence.getPairs()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 07:25:05 27 4
gpt4 key购买 nike

本文整理了Java中com.epam.wilma.domain.sequence.WilmaSequence.getPairs()方法的一些代码示例,展示了WilmaSequence.getPairs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WilmaSequence.getPairs()方法的具体详情如下:
包路径:com.epam.wilma.domain.sequence.WilmaSequence
类名称:WilmaSequence
方法名:getPairs

WilmaSequence.getPairs介绍

[英]This method give back the the collection of RequestResponsePairs of the store.
[中]此方法返回存储区的RequestResponsePairs集合。

代码示例

代码示例来源:origin: epam/Wilma

/**
 * Checks if all of the requests' responses arrived with the exception of the request with the given loggerId.
 * @param loggerId the given loggerId
 * @return true if all of the responses arrived (with the exception of the request's with the given loggerId), false otherwise
 */
public boolean checkIfAllResponsesArrived(final String loggerId) {
  Map<String, RequestResponsePair> pairs = getPairs();
  pairs.remove(loggerId);
  Iterator<RequestResponsePair> pairIterator = pairs.values().iterator();
  boolean result = true;
  while (pairIterator.hasNext() && result) {
    RequestResponsePair pair = pairIterator.next();
    result = pair.getResponse() != null;
  }
  return result;
}

代码示例来源:origin: epam/Wilma

private String getReferredSource(final String expression) {
  String[] parts = expression.substring(1).split("\\.");
  String link = parts[0];
  String linkedContent;
  if (SELF_REQUEST_REFFERENCE.equals(link)) {
    linkedContent = getSource();
  } else {
    Map<String, String> map = sequenceJsonTransformer.transform(params, sequence.getPairs());
    linkedContent = map.get(link);
  }
  return linkedContent;
}

代码示例来源:origin: epam/Wilma

@Override
public byte[] formatResponse(final WilmaHttpRequest wilmaRequest, final HttpServletResponse resp,
               final byte[] templateResource, final ParameterList params) {
  Map<String, RequestResponsePair> message = wilmaRequest.getSequence().getPairs();
  Map<String, String> nameToXml = sequenceXmlTransformer.transform(params, message);
  String xslResourcePath = checkAndGetXslResourcePath(params);
  byte[] xslResource = readXslResourceFromFileSystem(xslResourcePath);
  byte[] requestXmlResource = wilmaRequest.getBody().getBytes(StandardCharsets.UTF_8);
  return xslResponseGenerator.generateResponse(requestXmlResource, xslResource, templateResource, nameToXml);
}

代码示例来源:origin: epam/Wilma

@Test
  public void testCreateNewSequence() {
    //GIVEN
    String testKey = "TestKey";
    String logggerId = "testId";
    given(request.getWilmaMessageId()).willReturn(logggerId);
    //WHEN
    WilmaSequence result = underTest.createNewSequence(testKey, request, 1000L);
    //THEN
    Assert.assertEquals(result.getSequenceKey(), testKey);
    Assert.assertFalse(result.isExpired(new Timestamp(1000L)));
    RequestResponsePair firstPair = result.getPairs().get(logggerId);
    Assert.assertEquals(firstPair.getRequest(), request);
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com