Files
monorepo/LCU.API.Internal.ArchiverApi/LCU.Api.Internal.ArchiverApiTest/Services/CoreApiWrapperServiceTest.cs
T
2026-03-17 10:03:23 -05:00

39 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using NUnit.Framework;
using LCU.Api.Internal.ArchiverApi.Services;
using LCU.Api.Internal.ArchiverApi.Configuration;
using LCU.Library.Internal.CoreApiWrapperModel.CoreModels.CoreRequests;
namespace LCU.Api.Internal.ArchiverApiTest;
public class CoreApiWrapperServiceTest
{
private CoreApiWrapperService _coreApiWrapperService;
[SetUp]
public void Setup()
{
var archiveApiConfig = new ArchiverApiConfig()
{
CoreApiWrapperGetApplicationHistory = "https://TEST/GetApplicationHistory"
};
_coreApiWrapperService = new CoreApiWrapperService(archiveApiConfig);
}
[Test]
public void SetUpEndpoint_SetCorrect()
{
var applicationHistoryRequest = new ApplicationHistoryRequest()
{
ApplicationNumbers = new List<string> { "1", "2" },
EffectiveDate = Convert.ToDateTime("1/1/2021").ToString()
};
var request = _coreApiWrapperService.SetUpUrl(applicationHistoryRequest);
Assert.NotNull(request);
var testUrl = $"https://TEST/GetApplicationHistory?ApplicationNumbers=1&ApplicationNumbers=2&" +
"EffectiveDate=" + Convert.ToDateTime("1/1/2021").ToString();
Assert.AreEqual(testUrl, request);
}
}