Updating
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user