using LCU.Api.Internal.DataCleanUpLib.Repositories; using LCU.Api.Internal.DataCleanUpTest.RepositoryTests; using Xunit; using Moq; using System.Collections.Generic; using System.Linq; using LCU.Api.Internal.DataCleanUp.Configuration; namespace LCU.Api.Internal.DataCleanUpTest.Repositories; public class UpdateAccountLoanToValueRepositoryTest : DbContextFromJsonTest { private readonly LtvDataCleanUpRepository _ltvRepository; private readonly Mock _mockDataCleanupDefaults; public UpdateAccountLoanToValueRepositoryTest() { var dbContext = GetContextWithData(); _mockDataCleanupDefaults = new Mock(); _mockDataCleanupDefaults.Object.LtvExcludedMinorAccountTypes = new List () { "DL01", "DL02", "DL03", "DL04", "DL05", "DL06", "DL07", "DL08", "DL09", "DL10", "DL11", "DL12", "DL13", "DL14", "DL15", "DL16" }; _ltvRepository = new LtvDataCleanUpRepository(dbContext); } [Fact] public async void ExcludedListAsync_Return_1() //DL01 minor account type is filtered { var resultsBasic = await _ltvRepository.ListMinorAccountTypeAsync(_mockDataCleanupDefaults.Object.LtvExcludedMinorAccountTypes); //Assert Assert.NotNull(resultsBasic); Assert.Single(resultsBasic); Assert.Equal("SV01", resultsBasic.First().MinorType); } }