コード例 #1
0
 @Test
 public final void should_throw_error_if_expected_is_null() {
   thrown.expectNullPointerException("The given array should not be null");
   Object[] expected = null;
   assertions.contains(expected);
 }
コード例 #2
0
 @Test
 public final void should_fail_if_actual_does_not_contain_given_values() {
   thrown.expectAssertionError("<['Leia', 'Luke']> does not contain element(s):<['Han']>");
   assertions.contains("Han");
 }
コード例 #3
0
 @Test
 public final void should_pass_if_actual_contains_given_values() {
   assertions.contains("Leia", "Luke");
 }