mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-21 00:28:59 +01:00
...
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
using System.IO;
|
||||
using log4net.Config;
|
||||
using WireMock.FluentAssertions;
|
||||
using WireMock.RequestBuilders;
|
||||
using WireMock.ResponseBuilders;
|
||||
using WireMock.Server;
|
||||
|
||||
namespace WireMock.Net.ConsoleApplication;
|
||||
|
||||
@@ -9,6 +13,25 @@ static class Program
|
||||
{
|
||||
XmlConfigurator.Configure(new FileInfo("log4net.config"));
|
||||
|
||||
MainApp.Run();
|
||||
var server = WireMockServer.Start();
|
||||
|
||||
server
|
||||
.Given(Request.Create()
|
||||
.WithPath("todos")
|
||||
.UsingGet()
|
||||
)
|
||||
.RespondWith(Response.Create()
|
||||
.WithBody("test")
|
||||
);
|
||||
|
||||
server
|
||||
.Should()
|
||||
.HaveReceivedACall()
|
||||
.AtAbsoluteUrl("some-url").And
|
||||
.WithHeader("header-name", "header-value");
|
||||
|
||||
server.Stop();
|
||||
|
||||
// MainApp.Run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user