Question when using assertThat with Java8 and Lambda expressions

106 views
Skip to first unread message

Martin Schmiedel

unread,
Mar 6, 2015, 2:29:01 PM3/6/15
to hamcre...@googlegroups.com
We had an interesting issue today, where building a test with a lambda expression was just not working. I posted following question on StackOverflow. The last part (after a division line) is the relevant:


It is curious, if I include a method call as a first parameter for assertThat, and this method call has a lambda expression with generics, Eclipse is causing a compile error. 

I am not sure where the problem is, but I find it quite curious that the same expression can be compiled with assertEquals, but fails with assertThat. As I am not quite sure if it is a Hamcrest bug, I wanted to ask on this Usergroup before posting some Issue on Github... 

Any thoughts? Can someone confirm if it can be replicated?

Regards
Reply all
Reply to author
Forward
0 new messages