Ejemplo n.º 1
0
        public void Configuration(IAppBuilder app)
        {
            m_settings = new WireMockServerSettings();
            m_settings.StartAdminInterface = true;
            m_settings.ReadStaticMappings  = true;
            m_settings.WatchStaticMappings = true;
            m_settings.WatchStaticMappingsInSubdirectories = true;
            m_settings.FileSystemHandler = new LocalFileSystemHandler(HttpRuntime.AppDomainAppPath);
            m_settings.IgnorePrefixURLs  = new string[] { "/Hom*" };

            /*m_settings.ProxyAndRecordSettings = new ProxyAndRecordSettings()
             * {
             * Url = "http://www.google.com",
             * SaveMapping = true,
             * SaveMappingToFile = true
             * };*/

            m_wiremockServer = WireMockServer.StartForOwin(app, m_settings);

            app.Use(async(ctx, next) =>
            {
                ctx.Set("wiremockServer", m_wiremockServer);
                await next();
            });

            BuildTestScenario(m_wiremockServer);
        }