summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/inspection/dataFlow/fixture/AssertThat.java
blob: b3d614cd8cb3cf97f54c3ae8dd00340b5006eb9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import org.hamcrest.CoreMatchers;
import org.jetbrains.annotations.Nullable;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;

class Contracts {

  private void checkNotNullValue(@Nullable Object o) {
    assertThat(o, CoreMatchers.<Object>notNullValue());
    System.out.println(o.hashCode());
  }

  private void checkNotEqualToNull(@Nullable String test) {
    assertThat("String is null", test, not(equalTo(null)));
    int length = test.length();
  }

}