yavsc/test/yavscTests/Mandatory/Remoting.cs

72 lines
1.7 KiB
C#

7 years ago
// // YavscWorkInProgress.cs
// /*
// paul 21/06/2018 10:11 20182018 6 21
// */
using System.Net;
5 months ago
using isnd.tests;
7 years ago
using Xunit;
7 years ago
using Xunit.Abstractions;
7 years ago
5 years ago
namespace yavscTests
7 years ago
{
5 months ago
[Collection("Yavsc Server")]
5 years ago
[Trait("regression", "oui")]
5 months ago
public class Remoting : BaseTestContext, IClassFixture<WebServerFixture>
7 years ago
{
5 months ago
public Remoting(WebServerFixture serverFixture, ITestOutputHelper output)
7 years ago
: base(output, serverFixture)
7 years ago
{
5 months ago
7 years ago
}
7 years ago
[Theory]
5 months ago
[MemberData(nameof(GetLoginIntentData))]
public async Task TestUserMayLogin
(
5 months ago
string userName,
string password
)
{
7 years ago
try
{
5 months ago
var serverUrl = _serverFixture.Addresses.FirstOrDefault(
u => u.StartsWith("https:")
);
5 months ago
String auth = _serverFixture.SiteSettings.Authority;
5 months ago
5 years ago
var query = new Dictionary<string, string>
{
5 months ago
["Username"] = userName,
["Password"] = password,
5 months ago
["GrantType"] = "password"
5 years ago
};
5 months ago
throw new NotImplementedException();
7 years ago
7 years ago
}
catch (Exception ex)
{
var webex = ex as WebException;
5 months ago
if (webex != null)
7 years ago
{
5 months ago
if (webex.Status == WebExceptionStatus.ProtocolError)
7 years ago
{
5 months ago
7 years ago
}
5 months ago
}
7 years ago
throw;
}
7 years ago
}
7 years ago
5 months ago
public static IEnumerable<object[]> GetLoginIntentData()
5 months ago
{
5 months ago
return new object[][] { new object[] { "testuser", "test" } };
5 months ago
}
7 years ago
}
}