mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
25 lines
658 B
C#
25 lines
658 B
C#
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using BTCPayServer.Rating;
|
|
using BTCPayServer.Services.Rates;
|
|
|
|
namespace BTCPayServer.Tests.Mocks
|
|
{
|
|
public class MockRateProvider : IRateProvider
|
|
{
|
|
public List<PairRate> ExchangeRates { get; set; } = new List<PairRate>();
|
|
|
|
public RateSourceInfo RateSourceInfo => new RateSourceInfo("mock", "Mock", "https://mock.rf");
|
|
|
|
public MockRateProvider()
|
|
{
|
|
|
|
}
|
|
public Task<PairRate[]> GetRatesAsync(CancellationToken cancellationToken)
|
|
{
|
|
return Task.FromResult(ExchangeRates.ToArray());
|
|
}
|
|
}
|
|
}
|