Почему это утверждение не работает - AssertThat(foo, is(not(null)));JAVA

Программисты JAVA общаются здесь
Anonymous
Почему это утверждение не работает - AssertThat(foo, is(not(null)));

Сообщение Anonymous »

Это утверждение компилируется, но не выполняется, хотя я точно знаю, что foo не равно нулю:

import static org.hamcrest.Matchers.is; // see http://stackoverflow.com/a/27256498/2848676
import static org.hamcrest.Matchers.not;
import static org.hamcrest.MatcherAssert.assertThat;


...

assertThat(foo, is(not(null)));


Подробнее здесь: https://stackoverflow.com/questions/274 ... -isnotnull

Вернуться в «JAVA»