NSubstitute not matching Linq Expression
问题 I am implementing a repository pattern Query class and testing using NSubstitute. Repository interface: public interface IMyRepository { IQueryable<T> Query<T>(Expression<Func<T, bool>> filter) where T : class; } DateTimeProvider interface: public interface IMyDateTimeProvider { DateTime GetDateNow(); } Application interface: public interface IMyApplication { List<Thing> GetThingsByQuery(int status); } Application implementation: public class MyApplication : IMyApplication { private readonly