I am writing unit tests for below piece of code which is using Document client CreateDocumentQuery method with where(filter) conditions.
var documentQuery = ReadOnlyDocumentClient.CreateDocumentQuery<MyView>(UriFactory.CreateDocumentCollectionUri(Constants.COSMOS_DB_NAME, Constants.MY_VIEW_COL_NAME))
.Where(w => w.Name== query.Name)
.Where(w => w.DOB> query.StartDate && w.DOB < query.EndDate)
.AsDocumentQuery();
query is a command parameter which is an input.
I am using MOQ to mock and I am using below code line to mock
mockDocumentClient.Setup(s => s.CreateDocumentQuery<MyView>(It.IsAny<Uri>(), It.IsAny<FeedOptions>())).Returns(mockDocumentQuery.Object);
Now, above piece of code only mocks CreateDocumentQuery and when Where conditions are executed I am not getting mock support.
Please suggest how can I mock CreateDocumentQuery with where conditions?
Thanks in advance.