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"); }
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."); }
public void ItShouldNotThrowOnCacheableWithFakeCachingProviderCall() { Action act = () => CachingProvider.Cacheable(Enumerable.Empty <PersonEntity>().AsQueryable()).FirstOrDefault(); act.Should().NotThrow(); }