Esempio n. 1
0
 @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()));
 }
Esempio n. 2
0
 @Test
 public void shouldHandleArgAndException() {
   Arguments arguments = givenArguments().withArgAndException().build();
   assertThat(arguments.size(), is(1));
   assertThat(arguments.throwableArg(), is(not(nullValue())));
 }
Esempio n. 3
0
 @Test
 public void shouldHandleNoArgsAndAnException() throws NoSuchMethodException {
   Arguments arguments = givenArguments().withAnException().build();
   assertThat(arguments.size(), is(0));
   assertThat(arguments.throwableArg(), is(not(nullValue())));
 }
Esempio n. 4
0
 @Test
 public void shouldHandleMultipleArgs() throws NoSuchMethodException {
   Arguments arguments = givenArguments().withMultipleArgs().build();
   assertThat(arguments.size(), is(greaterThan(1)));
   assertThat(arguments.throwableArg(), is(nullValue()));
 }