AsyncEnumerableQueryTest.cs 835 B

12345678910111213141516171819202122232425262728
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the Apache 2.0 License.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Linq;
  5. using Xunit;
  6. namespace Tests
  7. {
  8. public class AsyncEnumerableQueryTest
  9. {
  10. [Fact]
  11. public void CastToUntypedIAsyncQueryable()
  12. {
  13. var query = Enumerable.Empty<string>().ToAsyncEnumerable().AsAsyncQueryable();
  14. Assert.IsAssignableFrom<IAsyncQueryable>(query);
  15. }
  16. [Fact]
  17. public void CastToUntypedIOrderedAsyncQueryable()
  18. {
  19. var query = Enumerable.Empty<string>().ToAsyncEnumerable().AsAsyncQueryable().OrderBy(s => s.Length);
  20. Assert.IsAssignableFrom<IOrderedAsyncQueryable>(query);
  21. }
  22. }
  23. }