i've been trying assert that my Set has collection with given property with hamcrest, using this solution, but i have :
java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V at org.hamcrest.Condition$Matched.matching(Condition.java:52)
imports:
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasProperty;
import static org.junit.Assert.assertThat;
code:
assertThat(mySet, contains(hasProperty("id", equalTo("expectedId"))));
have You any ideas how to assert it well ?
assertThat(mySet.contains(expectedValue), equalTo(true));
thank You :) – Pothook