Exemplo n.º 1
0
        public void Start_Then_Stop_ThenStart_ReturnsExpectedStatus()
        {
            using (var server = new HttpServer("test-server-1", 8093))
            {
                server.Start();
                server.Stop(true);
                server.Start();

                Assert.That(server.Status, Is.EqualTo(ServerStatus.Running));
            }
        }
Exemplo n.º 2
0
        public void Start_Then_Stop_ReturnsExpectedStatus()
        {
            using (var server = new HttpServer("test-server-1", 8093))
            {
                server.Start();

                Assert.That(server.Status, Is.EqualTo(ServerStatus.Running));

                server.Stop();

                Assert.That(server.Status == ServerStatus.ShuttingDown || server.Status == ServerStatus.Stopped);
            }
        }