private CompositeRootHttpServerConfiguration Setup(RootHttpServerConfiguration rootHttpServerConfiguration) { if (rootHttpServerConfiguration == null) { throw new ArgumentNullException(nameof(rootHttpServerConfiguration)); } foreach (var rootConfiguration in rootHttpServerConfiguration.RootConfigurations.Values) { if (string.IsNullOrEmpty(rootConfiguration.Endpoint)) { rootConfiguration.Endpoint = string.Format(CultureInfo.InvariantCulture, "http://{0}:{1}/{2}/", IPAddress.Loopback.ToString(), GetFreePortNumber(), GetType().Name); } } var serverConfiguration = new CompositeRootHttpServerConfiguration(rootHttpServerConfiguration); Configuration = serverConfiguration; return(serverConfiguration); }
public CompositeRootHttpServerTester(RootHttpServerConfiguration rootHttpServerConfiguration, IEnumerable <Assembly> serviceAssemblies) { var serverConfiguration = Setup(rootHttpServerConfiguration); Server = serverConfiguration.CreateServer(serviceAssemblies); }
public CompositeRootHttpServerTester(RootHttpServerConfiguration rootHttpServerConfiguration, params IService[] services) { var serverConfiguration = Setup(rootHttpServerConfiguration); Server = serverConfiguration.CreateServer(services); }