extended LoginProvider with additional data

This commit is contained in:
2023-12-08 00:28:04 +01:00
parent 05b722e513
commit 8d95693c02
11 changed files with 311 additions and 14 deletions
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
@@ -15,4 +15,8 @@
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SimpleHttpServer\SimpleHttpServer.csproj" />
</ItemGroup>
</Project>
+15
View File
@@ -0,0 +1,15 @@
using SimpleHttpServer;
using SimpleHttpServerTest.SimpleTestServer;
namespace SimpleHttpServerTest;
[TestClass]
public class SimpleServerTest {
[TestMethod]
public void RunTestServer() {
var server = HttpServer.Create(8833, "localhost", typeof(SimpleEndpointDefinition));
server.Start();
Console.WriteLine("press any key to exit");
Assert.IsTrue(server.Shutdown(10000), "server did not exit gracefully");
}
}
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SimpleHttpServer.Login;
namespace SimpleHttpServerTest.SimpleTestServer;
internal class LdAuthorizer {
private readonly LoginProvider lprov;
internal LdAuthorizer(LoginProvider lprov) {
this.lprov = lprov;
}
}
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleHttpServerTest.SimpleTestServer;
internal class SimpleEndpointDefinition {
}
-8
View File
@@ -1,8 +0,0 @@
namespace SimpleHttpServerTest;
[TestClass]
public class UnitTest1 {
[TestMethod]
public void TestMethod1() {
}
}