Esempio n. 1
0
        public void DeployerServiceHost_should_respond_to_client_requests()
        {
            // Arrange
            var address = string.Format("http://localhost:80/Temporary_Listen_Addresses/{0}", GetType().FullName);

            var containerBuilder = new DeployerContainerBuilder(DeployerContainerBuilder.RunMode.InteractiveConsole);

            using (var host = new DeployerServiceHost(new Uri(address), containerBuilder.Build()))
            {
                host.Start();

                var channel =
                    ChannelFactory <IDeployerService> .CreateChannel(
                        new WSHttpBinding { Security = { Mode = SecurityMode.None } },
                        new EndpointAddress(address + "/IDeployerService"));

                // Act
                channel.GetUptime();
            }

            // Assert
            // no exception
        }
Esempio n. 2
0
 public void Start()
 {
     _trigger.Start();
     _serviceHost.Start();
     StartTime = DateTime.UtcNow;
 }