Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit testing with WhereBulkContains #618

Open
paulabazalgette-dayshape opened this issue Feb 14, 2025 · 3 comments
Open

Unit testing with WhereBulkContains #618

paulabazalgette-dayshape opened this issue Feb 14, 2025 · 3 comments
Assignees

Comments

@paulabazalgette-dayshape
Copy link

paulabazalgette-dayshape commented Feb 14, 2025

Hello,

I'm looking for advice on unit testing when using WhereBulkContains.

We normally use another one of your products, Entity Framework Effort, for unit testing our repositories. However, because it's InMemory database, it's not compatible with WhereBulkContains. This is putting us in the position where in order to use the feature we need to sacrifice our test coverage, which is not always acceptable and therefore is limiting our ability to use the it. Could you advise how we can unit test methods that utilise WhereBulkContains?

@JonathanMagnan JonathanMagnan self-assigned this Feb 14, 2025
@JonathanMagnan
Copy link
Member

Hello @paulabazalgette-dayshape ,

There are not a lot of alternatives you can do. To test this method, you must have a real "test" database. That's and will always be the best way for you to test your project/our library.

Best regards,

Jon

@paulabazalgette-dayshape
Copy link
Author

Thanks @JonathanMagnan for a speedy reply.

We were hoping to mock the functionality in order to be able to unit test our repository logic, rather than testing the WhereBulkContains itself. Normally we use another of zzzprojects library - Effort for this purpose, so it's a bit of a shame that WhereBulkContains isn't compatible with this product.

@JonathanMagnan
Copy link
Member

Thank you for your feedback @paulabazalgette-dayshape

Unfortunately, time is limited, so that's impossible to do everything we wish. We currently move very slowly and already have a very big backlog list, so the support for this will never happen in all honestly.

Best Regards,

Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants