Ejemplo n.º 1
0
        public static WireMockServer AddDeleteEndpoint(this WireMockServer server, string path)
        {
            server.AddOptionEndpoint(path);

            server.Given(
                Request.Create()
                .WithPath(path)
                .UsingDelete()
                )
            .RespondWith(
                Response.Create()
                .AddHeaders()
                .WithStatusCode(200)
                );

            return(server);
        }
Ejemplo n.º 2
0
        public static WireMockServer AddGetEndpoint(this WireMockServer server, string path, object response)
        {
            server.AddOptionEndpoint(path);

            server.Given(
                Request.Create()
                .WithPath(path)
                .UsingGet()
                )
            .RespondWith(
                Response.Create()
                .AddHeaders()
                .WithBody(SerializeObject(response))
                .WithStatusCode(200)
                );

            return(server);
        }