Example #1
0
        public void ItShouldThrowOnCacheModeWithDirectCacheModeCall()
        {
#pragma warning disable 618
            Action act = () => LinqExtensionMethods.CacheMode(Enumerable.Empty <PersonEntity>().AsQueryable(), CacheMode.Normal).FirstOrDefault();
#pragma warning restore 618

            act.Should()
            .Throw <NotSupportedException>()
            .WithMessage(
                "The query.Provider does not support setting options. Please implement IQueryProviderWithOptions.");
        }