@Test public void shouldHandleNoArgs() { Arguments arguments = givenArguments().withNoArgs().build(); assertThat(arguments.arguments(), is(not(nullValue()))); assertThat(arguments.size(), is(0)); assertThat(arguments.throwableArg(), is(nullValue())); }
@Test public void shouldHandleArgAndException() { Arguments arguments = givenArguments().withArgAndException().build(); assertThat(arguments.size(), is(1)); assertThat(arguments.throwableArg(), is(not(nullValue()))); }
@Test public void shouldHandleNoArgsAndAnException() throws NoSuchMethodException { Arguments arguments = givenArguments().withAnException().build(); assertThat(arguments.size(), is(0)); assertThat(arguments.throwableArg(), is(not(nullValue()))); }
@Test public void shouldHandleMultipleArgs() throws NoSuchMethodException { Arguments arguments = givenArguments().withMultipleArgs().build(); assertThat(arguments.size(), is(greaterThan(1))); assertThat(arguments.throwableArg(), is(nullValue())); }