public void SimpleHttpServer_SanityChecks_WellKnownPortNumbersAreMappedToDefault()
        {
            var mockedServiceEndpoint = new Mock<BaseHttpServiceEndpoint>();
            Random portRandomizer = new Random();

            SimpleHttpServer server = new SimpleHttpServer(mockedServiceEndpoint.Object, portRandomizer.Next(1023));
            Assert.AreEqual(server.ListeningPort, 80);
        }
 public void SimpleHttpServer_SanityChecks_NullReferenceThrowsAnArgumentNullException()
 {
     SimpleHttpServer server = new SimpleHttpServer(null, 12345);
     Assert.Fail("Constructor should throw an exception.");
 }
 public void SimpleHttpServer_SanityChecks_TooBigPortNumberThrowsException()
 {
     var mockedServiceEndpoint = new Mock<BaseHttpServiceEndpoint>();
     SimpleHttpServer server = new SimpleHttpServer(mockedServiceEndpoint.Object, 65536);
     Assert.Fail("Constructor should throw an exception.");
 }
 public void SimpleHttpServer_CreateAnInstance_InstanceIsCreatedWithoutAnyErrors()
 {
     var mockedServiceEndpoint = new Mock<BaseHttpServiceEndpoint>();
     SimpleHttpServer server = new SimpleHttpServer(mockedServiceEndpoint.Object,12345);
     Assert.IsNotNull(server);
 }