1 year ago
#380995
Sudhesh Gnanasekaran
How to mock the mongodb Fluent Aggregate?
Below is the sample code I would like to mock the fluent result using Moq.
database.GetCollection(nameof(Collection)).Aggregate(). Match(x => x.IsActive) .Unwind(x => x.PersonalDetails, new AggregateUnwindOptions { PreserveNullAndEmptyArrays = false }) .Project(x => new ResultModel { Firstname = x.FirstName, Lastname = x.LastName }
mongodb
aggregation-framework
aggregate
moq
0 Answers
Your Answer