This commit is contained in:
Zeeshaun
2026-04-07 13:11:39 -05:00
parent d9931b3c36
commit e37826fe30
184 changed files with 2192 additions and 2196 deletions
@@ -13,9 +13,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="LCU.Api.Internal.FTPLib" Version="2.11.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="nunit" Version="4.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Moq" Version="4.13.1" />
@@ -4,61 +4,42 @@ using Moq;
using NUnit.Framework;
using LCU.API.Internal.MemberPreferencesApiLib.Repositories;
using LCU.API.Internal.MemberPreferencesApi.Services.XdiServices;
using LCU.API.Internal.MemberPreferencesApi.Configuration;
using LCU.Library.Internal.MemberPreferencesApiModels.Entities;
using LCU.Library.Internal.MemberPreferencesApiModels.Enums;
using LCU.Library.Internal.LcuMassTransitModels;
using LCU.API.Internal.MemberPreferencesApi.MicroApiServices;
namespace LCU.API.Internal.MemberPreferencesApi.IntegrationTests
{
public class XdiTransferTest
public class XdiBatchItemTest
{
private IXdiBatchService _xdiBatchItemService;
private Mock<IXdiBatchItemsRepository> _mockBatchItemsRepository;
private Mock<IUnitOfWork> _mockUnitOfWork;
private XdiSftpApiConfiguration _xdiSftpConfiguration;
private FtpApiConfiguration _ftpConfiguration;
private Mock<IUnifiedOptInRepository> _mockUnifiedOptinRepository;
private Mock<IMemberPreferenceRepository> _mockMemberPreferenceRepository;
private Mock<IFtpApiService> _mockFtpApiService;
private ConnectionConfiguration _connectionConfiguration;
private ReceiveEndpointConfiguration _completionReceiveEndpoint;
private ReceiveEndpointConfigurations _endpointConfiguration;
private Mock<IFileOperationsApiService> _mockFileOperationsApiService;
private IMock<IXdiBatchProcessInfoRepository> _mockXdiBatchProcessInfoRepository;
[SetUp]
public void Setup()
{
_mockFtpApiService = new Mock<IFtpApiService>();
_connectionConfiguration = new ConnectionConfiguration();
_mockBatchItemsRepository = new Mock<IXdiBatchItemsRepository>();
_mockMemberPreferenceRepository = new Mock<IMemberPreferenceRepository>();
_endpointConfiguration = new ReceiveEndpointConfigurations();
_completionReceiveEndpoint = _endpointConfiguration.XdiBatchConfirmEndpoint;
_mockUnitOfWork = new Mock<IUnitOfWork>();
_ftpConfiguration = new FtpApiConfiguration()
{
Url = "https://qa-ftpapi.lcu-internal.com/api/"
};
_xdiSftpConfiguration = new XdiSftpApiConfiguration()
{
HostName = "sftp.xdi.com",
UserName = "LANDMARKCU",
PortNumber = 22,
Password = "FILLMEIN",
Fingerprint = "ssh-dss 2048 12:78:33:0a:cf:71:21:e2:8b:0e:ef:6a:8a:c6:8e:4f"
};
_mockFileOperationsApiService = new Mock<IFileOperationsApiService>();
_mockUnifiedOptinRepository = new Mock<IUnifiedOptInRepository>();
_mockBatchItemsRepository = new Mock<IXdiBatchItemsRepository>();
_mockXdiBatchProcessInfoRepository = new Mock<IXdiBatchProcessInfoRepository>();
_mockUnitOfWork = new Mock<IUnitOfWork>();
_mockUnifiedOptinRepository = new Mock<IUnifiedOptInRepository>();
_mockMemberPreferenceRepository = new Mock<IMemberPreferenceRepository>();
_mockFileOperationsApiService = new Mock<IFileOperationsApiService>();
_xdiBatchItemService = new XdiBatchService(_mockBatchItemsRepository.Object, _mockUnitOfWork.Object,
_xdiSftpConfiguration, _mockUnifiedOptinRepository.Object, _mockMemberPreferenceRepository.Object,
_connectionConfiguration, _endpointConfiguration, _mockFtpApiService.Object);
_mockUnifiedOptinRepository.Object, _mockMemberPreferenceRepository.Object,
_mockFileOperationsApiService.Object, _mockXdiBatchProcessInfoRepository.Object);
}
[Ignore("This will actually create the items and FTP them to XDI Test Folder. Be Careful. Fill in password.")]
public void Test_Send_Test_Files()
[Test]
public void Test_XdiBatchItem_Setup()
{
IReadOnlyCollection<XdiBatchItem> items = new List<XdiBatchItem>()
{