# WireMock.Util.WireMockList`1 - Coverage Report

# Summary

Class: | WireMock.Util.WireMockList`1
Assembly: | WireMock.Net
File(s): | C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\WireMockList.cs
Covered lines: | 10
Uncovered lines: | 4
Coverable lines: | 14
Total lines: | 47
Line coverage: | 71.4%
Branch coverage: | 50%

# Metrics

Method | Cyclomatic complexity | NPath complexity | Sequence coverage | Branch coverage
--- | --- | --- | --- | ---
.ctor() | 1 | 0 | 100 | 100
.ctor(...) | 1 | 0 | 100 | 100
.ctor(...) | 1 | 0 | 0 | 0
ToString() | 3 | 4 | 80 | 60

# File(s)

## C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Util\WireMockList.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System.Collections.Generic;`
|  | `2` |  | `using System.Linq;`
|  | `3` |  | ``
|  | `4` |  | `namespace WireMock.Util`
|  | `5` |  | `{`
|  | `6` |  | `/// <summary>`
|  | `7` |  | `/// A special List which overrides the ToString() to return first value.`
|  | `8` |  | `/// </summary>`
|  | `9` |  | `/// <typeparam name="T">The generic type</typeparam>`
|  | `10` |  | `/// <seealso cref="List{T}" />`
|  | `11` |  | `public class WireMockList<T> : List<T>`
|  | `12` |  | `{`
|  | `13` |  | `/// <summary>`
|  | `14` |  | `/// Initializes a new instance of the <see cref="WireMockList{T}"/> class.`
|  | `15` |  | `/// </summary>`
| 18 | `16` |  | `public WireMockList()`
| 18 | `17` |  | `{`
| 18 | `18` |  | `}`
|  | `19` |  | ``
|  | `20` |  | `/// <summary>`
|  | `21` |  | `/// Initializes a new instance of the <see cref="WireMockList{T}"/> class.`
|  | `22` |  | `/// </summary>`
|  | `23` |  | `/// <param name="collection">The collection whose elements are copied to the new list.</param>`
| 255 | `24` |  | `public WireMockList(params T[] collection) : base(collection)`
| 255 | `25` |  | `{`
| 255 | `26` |  | `}`
|  | `27` |  | ``
|  | `28` |  | `/// <summary>`
|  | `29` |  | `/// Initializes a new instance of the <see cref="WireMockList{T}"/> class.`
|  | `30` |  | `/// </summary>`
|  | `31` |  | `/// <param name="collection">The collection whose elements are copied to the new list.</param>`
| 0 | `32` |  | `public WireMockList(IEnumerable<T> collection) : base(collection)`
| 0 | `33` |  | `{`
| 0 | `34` |  | `}`
|  | `35` |  | ``
|  | `36` |  | `/// <summary>`
|  | `37` |  | `/// Returns a <see cref="string" /> that represents this instance.`
|  | `38` |  | `/// </summary>`
|  | `39` |  | `public override string ToString()`
| 49 | `40` |  | `{`
| 49 | `41` |  | `if (this != null && this.Any())`
| 49 | `42` |  | `return this.First().ToString();`
|  | `43` |  | ``
| 0 | `44` |  | `return base.ToString();`
| 49 | `45` |  | `}`
|  | `46` |  | `}`
|  | `47` |  | `}`

# Methods/Properties

.ctor()
.ctor(T[])
.ctor(System.Collections.Generic.IEnumerable`1<T>)
ToString()