42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
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<DataCleanupDefaults> _mockDataCleanupDefaults;
|
|
|
|
|
|
public UpdateAccountLoanToValueRepositoryTest()
|
|
|
|
{
|
|
var dbContext = GetContextWithData();
|
|
_mockDataCleanupDefaults = new Mock<DataCleanupDefaults>();
|
|
_mockDataCleanupDefaults.Object.LtvExcludedMinorAccountTypes = new List <string>()
|
|
{
|
|
"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);
|
|
}
|
|
|
|
}
|
|
|