Mapping: generated C# code is missing InScenario and WillSetStateTo #712

Closed
opened 2025-12-29 15:31:40 +01:00 by adam · 1 comment
Owner

Originally created by @StefH on GitHub (Aug 11, 2025).

Originally assigned to: @StefH on GitHub.

Define mapping:

_server
  .Given(Request.Create()
    .WithPath("/todo/items")
    .UsingGet())
  .InScenario("To do list")
  .WillSetStateTo("TodoList State Started")
  .RespondWith(Response.Create()
    .WithBody("Buy milk"));

--> generated C# code is missing InScenario and WillSetStateTo

builder
    .Given(Request.Create()
        .UsingMethod("GET")
        .WithPath(new WildcardMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, "/todo/items", false, WireMock.Matchers.MatchOperator.Or))
    )
    .WithGuid("98fae52e-76df-47d9-876f-2ee32e931005")
    .RespondWith(Response.Create()
        .WithBody("Buy milk")
    );
Originally created by @StefH on GitHub (Aug 11, 2025). Originally assigned to: @StefH on GitHub. Define mapping: ``` c# _server .Given(Request.Create() .WithPath("/todo/items") .UsingGet()) .InScenario("To do list") .WillSetStateTo("TodoList State Started") .RespondWith(Response.Create() .WithBody("Buy milk")); ``` --> generated C# code is missing InScenario and WillSetStateTo ``` c# builder .Given(Request.Create() .UsingMethod("GET") .WithPath(new WildcardMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, "/todo/items", false, WireMock.Matchers.MatchOperator.Or)) ) .WithGuid("98fae52e-76df-47d9-876f-2ee32e931005") .RespondWith(Response.Create() .WithBody("Buy milk") ); ```
adam added the bug label 2025-12-29 15:31:40 +01:00
adam closed this issue 2025-12-29 15:31:40 +01:00
Author
Owner

@StefH commented on GitHub (Aug 11, 2025):

https://github.com/wiremock/WireMock.Net/pull/1347

@StefH commented on GitHub (Aug 11, 2025): https://github.com/wiremock/WireMock.Net/pull/1347
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#712