Ejemplo n.º 1
0
  @Test
  public void throwUnlessEmpty() {
    final AggregationArguments arguments =
        new AggregationArguments(ImmutableList.of(), ImmutableMap.of());

    arguments.throwUnlessEmpty("foo");
  }
Ejemplo n.º 2
0
  @Test
  public void throwUnlessEmptySingular() {
    expected.expect(IllegalStateException.class);
    expected.expectMessage("foo: has trailing argument a and keyword b");

    final AggregationArguments arguments =
        new AggregationArguments(ImmutableList.of(a), ImmutableMap.of("b", b));

    arguments.throwUnlessEmpty("foo");
  }
Ejemplo n.º 3
0
  @Test
  public void throwUnlessEmptyKeywords() {
    expected.expect(IllegalStateException.class);
    expected.expectMessage("foo: has trailing keywords [a, b]");

    final AggregationArguments arguments =
        new AggregationArguments(ImmutableList.of(), ImmutableMap.of("a", a, "b", b));

    arguments.throwUnlessEmpty("foo");
  }