System.Linq.Tests.LastTests.EmptySourcePredicate C# (CSharp) Méthode

EmptySourcePredicate() private méthode

private EmptySourcePredicate ( ) : void
Résultat void
        public void EmptySourcePredicate()
        {
            IQueryable<int> source = Enumerable.Empty<int>().AsQueryable();

            Assert.Throws<InvalidOperationException>(() => source.Last(x => true));
            Assert.Throws<InvalidOperationException>(() => source.Last(x => false));
        }