< Summary

Class:Azure.Core.TestFramework.TestAsyncEnumerableExtensions
Assembly:Azure.Core.TestFramework
File(s):C:\Git\azure-sdk-for-net\sdk\core\Azure.Core.TestFramework\src\TestAsyncEnumerableExtensions.cs
Covered lines:5
Uncovered lines:0
Coverable lines:5
Total lines:21
Line coverage:100% (5 of 5)
Covered branches:7
Total branches:12
Branch coverage:58.3% (7 of 12)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToEnumerableAsync()-100%58.33%

File(s)

C:\Git\azure-sdk-for-net\sdk\core\Azure.Core.TestFramework\src\TestAsyncEnumerableExtensions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5using System.Threading.Tasks;
 6
 7namespace Azure.Core.TestFramework
 8{
 9    public static class TestAsyncEnumerableExtensions
 10    {
 11        public static async Task<List<T>> ToEnumerableAsync<T>(this IAsyncEnumerable<T> asyncEnumerable)
 12        {
 224813            List<T> list = new List<T>();
 28523214            await foreach (T item in asyncEnumerable)
 15            {
 14036816                list.Add(item);
 17            }
 224818            return list;
 224819        }
 20    }
 21}

Methods/Properties

ToEnumerableAsync()