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