mmnaseri / spring-data-mock

Mock facility for Spring Data repositories
MIT License
135 stars 44 forks source link

Probles with ...In requests #153

Closed neonomaly closed 4 years ago

neonomaly commented 7 years ago

Hi. Have Spring Data CRUD Repository with method List<Order> findByStatusIn(List<Order.Status> statusList); During test execution have this exception: Encountered an error while resolving operation metadata: public abstract java.util.List OrderRepository.findByStatusIn(java.util.List) And nested exception: OrderRepository: Expected parameter 0 on method findByStatusIn to be a descendant of class Order$Status

hitokun-s commented 6 years ago

I encountered the same problem.

KatGunz commented 6 years ago

Is there a known work around for this issue?

hitokun-s commented 6 years ago

FYI I solved this problem by creating JpaRepository mocking system in Groovy.
https://github.com/hitokun-s/mock-jpa-repository-test

mmnaseri commented 6 years ago

Hi all,

Sorry for the super late reply. I had to figure out some kinks with open-source contribution policies with my current employer. Now that that is resolved, I'll be back in business.

@neonomaly @hitokun-s @KatGunz this is a result of an oversight on my part. I simply haven't implemented the In operator, it seems. I will have to investigate and fix this.

mmnaseri commented 4 years ago

This should be fixed as of #156 by @MateuszStefek