public void ItShouldThrowOnCacheableWithCachingProviderCall()
        {
            Action act = () => CachingProvider.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");
        }
Exemplo n.º 2
0
        public void ItShouldThrowOnCacheableWithCachingProviderCall()
        {
            Action act = () => CachingProvider.Cacheable(Enumerable.Empty <PersonEntity>().AsQueryable()).FirstOrDefault();

            act.Should()
            .Throw <NotSupportedException>()
            .WithMessage(
                "The query.Provider does not support setting options. Please implement IQueryProviderWithOptions.");
        }
Exemplo n.º 3
0
        public void ItShouldNotThrowOnCacheableWithFakeCachingProviderCall()
        {
            Action act = () => CachingProvider.Cacheable(Enumerable.Empty <PersonEntity>().AsQueryable()).FirstOrDefault();

            act.Should().NotThrow();
        }