< Summary

Information
Class: c:\Source 2025\CurrencyConverter\CurrencyConverter\src\Infrastructure\ExchangeProviders\ExchangeProviderFactory.cs
Assembly: Default
File(s): c:\Source 2025\CurrencyConverter\CurrencyConverter\src\Infrastructure\ExchangeProviders\ExchangeProviderFactory.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 18
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

File(s)

c:\Source 2025\CurrencyConverter\CurrencyConverter\src\Infrastructure\ExchangeProviders\ExchangeProviderFactory.cs

#LineLine coverage
 1using Domain.Currencies;
 2
 3namespace Infrastructure.ExchangeProviders
 4{
 5    public class ExchangeProviderFactory : IExchangeProviderFactory
 6    {
 7        private readonly IEnumerable<IExchangeProvider> _exchangeProviders;
 18        public ExchangeProviderFactory(IEnumerable<IExchangeProvider> exchangeProviders)
 19        {
 110            _exchangeProviders = exchangeProviders;
 111        }
 12
 13        public IExchangeProvider? GetProvider(ExchangeProviderType providerType)
 114        {
 215            return _exchangeProviders.FirstOrDefault(x => x.ProviderType == providerType);
 116        }
 17    }
 18}