Exemplo n.º 1
0
        public async ValueTask <int> Hyperlinq_Empty_Async()
        {
            var sum = 0;

            await foreach (var item in AsyncValueEnumerable.Empty <int>())
            {
                sum += item;
            }
            return(sum);
        }
        public void Empty_Must_Succeed()
        {
            // Arrange
            var expected = Enumerable.Empty <int>();

            // Act
            var result = AsyncValueEnumerable.Empty <int>();

            // Assert
            _ = result.Must()
                .BeAsyncEnumerableOf <int>()
                .BeEqualTo(expected);
        }