Answers for "anyof hamcrest"

1

anyof hamcrest

Anyof method is similar to "OR" = ||
logic in Java. We are checking 2 conditions and
if either one is pass than test pass

for example


assertThat("John Doe" , anyOf ( is ("John"), endsWith("oe"));
//any of --> or logic as long as one matcher match it will pass
Posted by: Guest on December-15-2020

Browse Popular Code Answers by Language