public void ItShouldThrowOnCacheableWithDirectCacheableCall()
        {
            Action act = () => LinqExtensionMethods.Cacheable(Enumerable.Empty <PersonEntity>().AsQueryable()).FirstOrDefault();

            act.Should()
            .Throw <InvalidOperationException>()
            .WithMessage(
                "There is no method 'Cacheable' on type 'NHibernate.Linq.LinqExtensionMethods' that matches the specified arguments");
        }
예제 #2
0
        public void ItShouldThrowOnCacheableWithDirectCacheableCall()
        {
#pragma warning disable 618
            Action act = () => LinqExtensionMethods.Cacheable(Enumerable.Empty <PersonEntity>().AsQueryable()).FirstOrDefault();
#pragma warning restore 618

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