Hamcrest When to use Is or equalTo

Viewed 11755

I'm new using hamcrest. While I'm discovering how to use it I have been a doubt about when to use is or equalTo.

Is there any difference between is and equalTo, although it is conceptually or ocasionally? It seems to behave the same.

 Assert.assertThat(actual, equalTo("blue"));
 Assert.assertThat(actual, is("red"));

Why do you would use one instead of the other?

2 Answers
Related