コード例 #1
0
 static {
   try {
     expectedResult = ObjectMapperSingleton.getObjectMapper().readTree("\"failed\"");
   } catch (IOException ioe) {
     throw new RuntimeException(ioe);
   }
 }
コード例 #2
0
 /**
  * Takes the result and determines whether the state of the resource matches the expected state.
  * To determine the current state of the resource, JmesPath expression is evaluated and compared
  * against the expected result.
  *
  * @param result Corresponding result of the operation
  * @return True if current state of the resource matches the expected state, False otherwise
  */
 @Override
 public boolean matches(DescribeClusterSnapshotsResult result) {
   JsonNode queryNode = ObjectMapperSingleton.getObjectMapper().valueToTree(result);
   JsonNode finalResult = ast.accept(new JmesPathEvaluationVisitor(), queryNode);
   return AcceptorPathMatcher.pathAny(expectedResult, finalResult);
 }