@Test public void rowOfArgumentsWrong() { _thrown.expect(IllegalArgumentException.class); _thrown.expectMessage("argument 2 must be a string, but is: 7"); Row.builder().rowOf("a", 5, 7, "b"); } }
@Test public void rowOfOddElements() { _thrown.expect(IllegalArgumentException.class); _thrown.expectMessage("expecting an even number of parameters, not 1"); Row.builder().rowOf("a"); }
/** * Returns a new {@link Row} with the given entries. * * <p>{@code objects} should be an even number of parameters, where the 0th and every even * parameter is a {@link String} representing the name of a column. */ public static Row of(Object... objects) { return builder().rowOf(objects); }