mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
dfa: understand assertThat notnull (IDEA-125977, IDEA-65004)
This commit is contained in:
@@ -0,0 +1,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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user