JavaHamcrest icon indicating copy to clipboard operation
JavaHamcrest copied to clipboard

Correctly failing containsInAnyOrder assertion causing java.lang.NoSuchMethodError

Open kmbyrne opened this issue 8 years ago • 1 comments

The following JUnit can reproduce: @Test public void enumTest() { Set<DayOfWeek> dayOfWeekSet = new HashSet<>(); dayOfWeekSet.add(DayOfWeek.MONDAY); // I expect this to fail. assertThat(dayOfWeekSet, containsInAnyOrder(DayOfWeek.values())); }

I'm using: <groupId>org.hamcrest</groupId> <artifactId>hamcrest-all</artifactId> 1.3 test

kmbyrne avatar Aug 01 '17 20:08 kmbyrne

I'm not certain what caused this problem for OP, but I can't reproduce this error.

@kmbyrne I know it's been 3 years, but can you provide any further details about what the unexpected error message said when you encountered this?

brownian-motion avatar Apr 20 '20 01:04 brownian-motion