Пример #1
0
 @Test
 public void inequalityOfNullsFail() {
   try {
     assertThat((Long) null).isNotEqualTo((Integer) null);
     fail("Should have thrown");
   } catch (AssertionError e) {
     assertThat(e.getMessage()).contains("Not true that <null> is not equal to <null>");
   }
 }
Пример #2
0
 @Test
 public void inequalityOfNulls() {
   assertThat((Long) null).isNotEqualTo(4);
   assertThat(4).isNotEqualTo((Long) null);
 }