@Test public void testParseQuorumOfHostPoolAlt() { VirtualCheckOperator op = VirtualCheckExpressionParser.parseVirtualCheckExpression("quorum of hosts in resource pool 'test' as WARNING, CRITICAL"); assertThat(op.toString(), is(equalTo("majority of hosts in pool 'test' as WARNING, CRITICAL"))); assertThat(op.computePoolDependencies(null), is(equalTo(new HashSet<String>(Arrays.asList("test"))))); }
public static final VirtualCheckOperator parseVirtualCheckExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readExpression(); } } catch (Exception e) { throw new RuntimeException("Failed to parse virtual check expression: '" + expression + "'", e); } }
VirtualCheckExpressionParser { public static final VirtualCheckOperator parseVirtualCheckExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readExpression(); } } catch (Exception e) { throw new RuntimeException("Failed to parse virtual check expression: '" + expression + "'", e); } } }
VirtualCheckExpressionParser { public static final VirtualCheckOperator parseVirtualCheckExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readExpression(); } } catch (Exception e) { throw new RuntimeException("Failed to parse virtual check expression: '" + expression + "'", e); } }  }
VirtualCheckExpressionParser { public static final VirtualCheckOperator parseVirtualCheckExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readExpression(); } } catch (Exception e) { throw new RuntimeException("Failed to parse virtual check expression: '" + expression + "'", e); } }  static final VirtualCheckOperator parseVirtualCheckExpression(String expression); static final List<CheckReference<?>> parseParentsExpression(String expression); }
VirtualCheckExpressionParser { public static final VirtualCheckOperator parseVirtualCheckExpression(String expression) { try { try (StringReader reader = new StringReader(expression)) { VirtualCheckExpressionParserInternal parser = new VirtualCheckExpressionParserInternal(reader); return parser.readExpression(); } } catch (Exception e) { throw new RuntimeException("Failed to parse virtual check expression: '" + expression + "'", e); } }  static final VirtualCheckOperator parseVirtualCheckExpression(String expression); static final List<CheckReference<?>> parseParentsExpression(String expression);  }