< Summary

Information
Class: MyNet.Fakers.Geography.CountryFaker
Assembly: MyNet.Fakers
File(s): https://raw.githubusercontent.com/sandre58/MyNet/5aaaab311aa14541478b9e402357d98b657a23e4/src/MyNet.Fakers/Geography/CountryFaker.cs
Tag: 342_31701152804
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 33
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Country()100%11100%
Name()100%11100%
Alpha2()100%11100%
Alpha3()100%11100%
Iso()100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/5aaaab311aa14541478b9e402357d98b657a23e4/src/MyNet.Fakers/Geography/CountryFaker.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="CountryFaker.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using MyNet.Generator;
 8using MyNet.Geography;
 9
 10namespace MyNet.Fakers.Geography;
 11
 12/// <summary>
 13/// Current implementation of <see cref="ICountryFaker"/>.
 14/// </summary>
 15/// <param name="random">The random generator to use.</param>
 16public sealed class CountryFaker(IRandomGenerator random) : ICountryFaker
 17{
 18    /// <inheritdoc />
 319    public Country Country() => random.Item(global::MyNet.Geography.Country.All);
 20
 21    /// <inheritdoc />
 322    public string Name() => random.Item(global::MyNet.Geography.Country.All).Name;
 23
 24    /// <inheritdoc />
 325    public string Alpha2() => random.Item(global::MyNet.Geography.Country.All).Alpha2;
 26
 27    /// <inheritdoc />
 328    public string Alpha3() => random.Item(global::MyNet.Geography.Country.All).Alpha3;
 29
 30    /// <inheritdoc />
 331    public int Iso() => random.Item(global::MyNet.Geography.Country.All).Iso;
 32}
 33

Methods/Properties

Country()
Name()
Alpha2()
Alpha3()
Iso()