45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System.Net.Http;
|
|
using System.Threading.Tasks;
|
|
using Moq;
|
|
using Xunit;
|
|
using Landmark.OLA.Models.Addresses;
|
|
|
|
namespace Landmark.OLA.Integration.Tests
|
|
{
|
|
public class SAMLAssertionControllerTest : OlaIntegrationTest
|
|
{
|
|
public Address testResult;
|
|
|
|
public SAMLAssertionControllerTest() : base()
|
|
{
|
|
testResult = new Address()
|
|
{
|
|
Address1 = "111 South First Street",
|
|
City = "Milwaukee",
|
|
State = Models.Addresses.Enums.StateOption.WI,
|
|
PostalCode = "53207",
|
|
Country = Models.Addresses.Enums.CountryOption.UnitedStates
|
|
};
|
|
mockUspsVendorClient.Setup(repo => repo.CompareAddress(It.IsAny<Address>()))
|
|
.Returns(Task.FromResult(testResult));
|
|
}
|
|
|
|
[Fact]
|
|
public async Task CanInitAnonymousSession()
|
|
{
|
|
// Arrange
|
|
|
|
// Act
|
|
HttpResponseMessage httpResponse = await _client.GetAsync("/api/SAMLAssertionConsumer/InitSession");
|
|
|
|
// Must be successful.
|
|
httpResponse.EnsureSuccessStatusCode();
|
|
|
|
|
|
// Deserialize and examine results.
|
|
var stringResponse = await httpResponse.Content.ReadAsStringAsync();
|
|
|
|
Assert.Equal("", stringResponse);
|
|
}
|
|
}
|
|
} |