Unit Testing Query<T> #3428
Unanswered
leopoldev404
asked this question in
General
Replies: 1 comment
-
If you look at the tests we have Marten in test suite, everything pertaining to querying is fully integration tests with Postgres DB. @jeremydmiller always recommended not to mock the portions/LINQ support which you are attempting to do. Our suggested approach is to write integration tests talking to a Postgres database. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am writing some xunit unit tests for marten.
I want to mock, using Moq package, the behavior of:
await session.Query().ToListAsync(token).ConfigureAwait(false);
but seems that it's not possible to cast an IQueryable object to type 'Marten.Linq.IMartenQueryable'.
Does anyone knows how to approach this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions