< Summary

Class:BatchTestCommon.FakePage`1
Assembly:Microsoft.Azure.Batch.Common
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\tests\TestCommon\FakePage.cs
Covered lines:7
Uncovered lines:1
Coverable lines:8
Total lines:32
Line coverage:87.5% (7 of 8)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_NextPageLink()-100%100%
get_Collection()-100%100%
GetEnumerator()-100%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\tests\TestCommon\FakePage.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for license information.
 3
 4namespace BatchTestCommon
 5{
 6    using System.Collections.Generic;
 7    using Microsoft.Rest.Azure;
 8
 9    public class FakePage<T> : IPage<T>
 10    {
 2411        public FakePage(IList<T> collection, string nextPageLink = null)
 12        {
 2413            this.NextPageLink = nextPageLink;
 2414            this.Collection = collection;
 2415        }
 16
 4817        public string NextPageLink { get; private set; }
 18
 7019        private IList<T> Collection { get; set; }
 20
 21        public IEnumerator<T> GetEnumerator()
 22        {
 4623            return this.Collection.GetEnumerator();
 24        }
 25
 26        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
 27        {
 028            return GetEnumerator();
 29        }
 30
 31    }
 32}