yavsc/test/yavscTests/Mandatory/Remoting.cs

71 lines
1.7 KiB
C#
Raw Normal View History

2018-07-15 00:29:06 +02:00
// // YavscWorkInProgress.cs
// /*
// paul 21/06/2018 10:11 20182018 6 21
// */
2018-07-25 02:12:13 +02:00
using System.Net;
2025-07-13 18:13:04 +01:00
using isnd.tests;
2018-07-15 00:29:06 +02:00
using Xunit;
2018-07-21 16:15:54 +02:00
using Xunit.Abstractions;
2018-07-15 00:29:06 +02:00
2021-06-06 20:32:39 +01:00
namespace yavscTests
2018-07-15 00:29:06 +02:00
{
2025-07-16 00:47:50 +01:00
[Collection("Yavsc Server")]
2021-01-04 00:11:27 +00:00
[Trait("regression", "oui")]
2025-07-13 18:13:04 +01:00
public class Remoting : BaseTestContext, IClassFixture<WebServerFixture>
2018-07-15 00:29:06 +02:00
{
2025-07-13 18:13:04 +01:00
public Remoting(WebServerFixture serverFixture, ITestOutputHelper output)
2018-08-02 12:28:13 +02:00
: base(output, serverFixture)
2018-07-21 16:15:54 +02:00
{
2025-07-13 18:13:04 +01:00
2018-07-21 16:15:54 +02:00
}
2018-07-15 00:29:06 +02:00
2018-07-25 02:12:13 +02:00
[Theory]
2025-07-16 00:47:50 +01:00
[MemberData(nameof(GetLoginIntentData))]
2018-07-25 02:12:13 +02:00
public async Task TestUserMayLogin
(
2025-07-15 17:35:14 +01:00
string userName,
string password
2018-07-25 02:12:13 +02:00
)
{
2018-08-02 12:28:13 +02:00
try
{
2025-07-16 00:47:50 +01:00
var serverUrl = _serverFixture.Addresses.FirstOrDefault(
u => u.StartsWith("https:")
);
2025-07-15 17:35:14 +01:00
String auth = _serverFixture.SiteSettings.Authority;
2025-07-16 00:47:50 +01:00
2021-01-02 00:41:54 +00:00
var query = new Dictionary<string, string>
{
2025-07-15 17:35:14 +01:00
["Username"] = userName,
["Password"] = password,
2025-07-16 00:47:50 +01:00
["GrantType"] = "password"
2021-01-02 00:41:54 +00:00
};
2025-07-16 00:47:50 +01:00
throw new NotImplementedException();
2018-07-15 00:29:06 +02:00
2018-08-02 12:28:13 +02:00
}
catch (Exception ex)
{
var webex = ex as WebException;
2025-07-16 00:47:50 +01:00
if (webex != null)
2018-08-02 12:28:13 +02:00
{
2025-07-16 00:47:50 +01:00
if (webex.Status == WebExceptionStatus.ProtocolError)
2018-08-02 12:28:13 +02:00
{
2025-07-16 00:47:50 +01:00
2018-08-02 12:28:13 +02:00
}
2025-07-16 00:47:50 +01:00
}
2018-08-02 12:28:13 +02:00
throw;
}
2018-07-15 00:29:06 +02:00
}
2018-08-02 12:28:13 +02:00
2025-07-16 00:47:50 +01:00
public static IEnumerable<object[]> GetLoginIntentData()
2025-07-13 18:13:04 +01:00
{
2025-07-16 00:47:50 +01:00
return new object[][] { new object[] { "testuser", "test" } };
2025-07-13 18:13:04 +01:00
}
2018-07-15 00:29:06 +02:00
}
}