예제 #1
0
        /// <summary>
        /// Starts a route test.
        /// </summary>
        /// <param name="httpConfiguration">Optional HttpConfiguration to use in case one is not configured globally.</param>
        /// <returns>Route test builder.</returns>
        public static IRouteTestBuilder Routes(HttpConfiguration httpConfiguration = null)
        {
            if (httpConfiguration == null)
            {
                HttpConfigurationValidator.ValidateGlobalConfiguration("routes");
                httpConfiguration = Configuration;
            }

            return(new RouteTestBuilder(httpConfiguration));
        }
예제 #2
0
파일: Api.cs 프로젝트: mstru/Testing
        /// <summary>
        /// Spusti novy HTTP server.
        /// </summary>
        /// <param name="httpConfiguration">Volitelna konfiguracia protokolu HTTP. Ak nie je poskytnuta ziadna konfiguracia, namiesto nej sa pouzije globalna.</param>
        /// <returns>Server builder.</returns>
        public IApiBuilder Starts(HttpConfiguration httpConfiguration = null)
        {
            if (httpConfiguration == null)
            {
                HttpConfigurationValidator.ValidateGlobalConfiguration("server pipeline");
                httpConfiguration = MyWebApi.Configuration;
            }

            HttpTestServer.StartGlobal(httpConfiguration);
            return(this.Working());
        }