Esempio n. 1
0
        public static void ReadAllMappings(this WireMockServer stubServer)
        {
            var adminFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory !, "__admin");

            foreach (var directory in Directory.EnumerateDirectories(adminFolder))
            {
                stubServer.ReadStaticMappings(directory);

                foreach (var subDirectory in Directory.EnumerateDirectories(directory))
                {
                    stubServer.ReadStaticMappings(subDirectory);
                }
            }
        }
Esempio n. 2
0
        protected BaseTestController(WebApplicationFactory factory)
        {
            HttpClient = factory.CreateClient();
            var wiereMockConfig = new WireMockServerSettings
            {
                Urls = new[] { "http://localhost:9093" },
                ReadStaticMappings = true
            };

            httpMockServer = WireMockServer.Start(wiereMockConfig);
            httpMockServer.ResetMappings();
            httpMockServer.ReadStaticMappings("Integration/Mappings/");
        }
Esempio n. 3
0
        private WireMockServer SetupMockedServer()
        {
            FluentMockServerSettings settings = new FluentMockServerSettings()
            {
                Urls = new[] { _testSupportConfigurationOptions.ServerMockUrl },
                ReadStaticMappings = true,
            };

            WireMockServer mockServer = WireMockServer.Start(settings);

            mockServer.ReadStaticMappings("Mappings/");

            return(mockServer);
        }