29 lines
884 B
C#
29 lines
884 B
C#
using System.Xml.Linq;
|
|
using Xunit;
|
|
using CRIF.ACTion.Decisioning;
|
|
using Landmark.OLA.Models.Decisioning.Enums;
|
|
|
|
namespace CRIF.ACTion.Tests.Decisioning
|
|
{
|
|
public class DecisioningStateResponseParserTest
|
|
{
|
|
private readonly string LoanApplicationId = "1200400";
|
|
|
|
[Fact]
|
|
public void SendToDecisioningResponse()
|
|
{
|
|
string successResponsePath = "ExampleXML" + System.IO.Path.DirectorySeparatorChar + "SendToDecisioningParser" + System.IO.Path.DirectorySeparatorChar + "SuccessResponse.xml";
|
|
|
|
var successResponse = (XElement)XDocument.Load(successResponsePath).FirstNode;
|
|
|
|
var parser = new DecisioningStateResponseParser();
|
|
|
|
parser.SetLoanId(LoanApplicationId);
|
|
|
|
var result = parser.Parse(successResponse);
|
|
|
|
Assert.Equal(DecisioningState.Requested, result);
|
|
}
|
|
}
|
|
}
|