using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BuddyFinance.Integration.Mocks { public class CreditBureauServiceMock : IDisposable { private Random _randomizer = new Random(); public void Dispose() { _randomizer = null; } public CustomerCreditReportMock GetCreditReport(string identificationNumber) { return new CustomerCreditReportMock { CreditScore = _randomizer.Next(0, 900), AccountsList = _mockAccounts }; } private List _mockAccounts { get { var r = new Random(); return new List { new CustomerAccount { AccountName = _accounts[r.Next(0, 9)], DateOpended = DateTime.Today.AddMonths(r.Next(1, 11)), Status = _status[r.Next(0, 2)], Amount = r.Next(0, 15000) }, new CustomerAccount { AccountName = _accounts[r.Next(0, 9)], DateOpended = DateTime.Today.AddMonths(r.Next(1, 11)), Status = _status[r.Next(0, 2)], Amount = r.Next(0, 15000) }, new CustomerAccount { AccountName = _accounts[r.Next(0, 9)], DateOpended = DateTime.Today.AddMonths(r.Next(1, 11)), Status = _status[r.Next(0, 2)], Amount = r.Next(0, 15000) }, new CustomerAccount { AccountName = _accounts[r.Next(0, 9)], DateOpended = DateTime.Today.AddMonths(r.Next(1, 11)), Status = _status[r.Next(0, 2)], Amount = r.Next(0, 15000) }, }; } } private List _accounts { get { return new List { "ABC FINANCE PTY. LTD", "JABULANI MICRO FINANCE", "BUDDY FINANCE PTY. LTD", "ABSA BANK", "CAPITEC BANK", "MOSHITO O TSWELA PELE MICRO FINANCE", "MASISIZANE FINANCE", "MONEY IN THE BANK PTY. LTD", "PIETER VAN NIEKERK LOANS", "MASHONISA LOANS" }; } } private List _status { get { return new List { "Active", "Settled In Full", "Paid Up", }; } } } }