public void ItShouldThrowOnCacheableWithDirectSetOptionsCall() { #pragma warning disable 618 Action act = () => LinqExtensionMethods.SetOptions(Enumerable.Empty <PersonEntity>().AsQueryable(), options => options.SetCacheable(true)).FirstOrDefault(); #pragma warning restore 618 act.Should() .Throw <NotSupportedException>() .WithMessage( "The query.Provider does not support setting options. Please implement IQueryProviderWithOptions."); }