コード例 #1
0
 @Test
 public void testShowSchemasFromOther() throws Exception {
   MaterializedResult result = computeActual("SHOW SCHEMAS FROM tpch");
   ImmutableSet<String> schemaNames =
       ImmutableSet.copyOf(transform(result.getMaterializedRows(), onlyColumnGetter()));
   assertTrue(schemaNames.containsAll(ImmutableSet.of(INFORMATION_SCHEMA, "sys", "tiny")));
 }
コード例 #2
0
  @Override
  public void discard(final CardSet cards) {
    Arguments.checkIsNotNull(cards, "cards");
    Arguments.checkIsTrue(
        baseDeck.containsAll(cards), String.format("Unrecognized cards in [%s]", cards));
    Arguments.checkIsTrue(
        !liveDeck.containsAll(cards),
        String.format("Found one or more cards already in deck [%s]", cards));
    Arguments.checkIsTrue(
        !discardPile.containsAll(cards),
        String.format("Found one or more cards already discarded [%s]", cards));

    discardPile.addAll(cards);
  }