Exemplo n.º 1
0
        public void ItShouldThrowOnTimeoutWithDirectTimeoutCall()
        {
#pragma warning disable 618
            Action act = () => LinqExtensionMethods.Timeout(Enumerable.Empty <PersonEntity>().AsQueryable(), 1000).FirstOrDefault();
#pragma warning restore 618

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