CSharpHttpServer/SimpleHttpServerTest/SimpleServerTest.cs

15 lines
455 B
C#

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");
}
}