What is the alternative to using the Deprecated Hamcrest method is()?

前端 未结 3 1590
走了就别回头了
走了就别回头了 2021-02-03 17:31

I use the following code at the moment to assert on a boolean value, however the method org.hamcrest.Matchers.is() is deprecated.

asser         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-03 17:58

    Have you tried equalTo(T)?

    assertThat(someValue, equalTo(false));
    

    I don't see that is(T) is deprecated - is(Class) is deprecated however.

提交回复
热议问题