Fix #1501: Generate WhenStateIs/WillSetStateTo correctly in ToCSharpCode (#1502)

* Fix #1501: Generate WhenStateIs/WillSetStateTo correctly in ToCSharpCode

* Fix matcher to code converters. Refactor changes.

* Adjust test artifacts.

* Return fully qualified class names for matchers
This commit is contained in:
Dmytro Nikitin
2026-08-19 19:58:47 +02:00
committed by GitHub
parent 42353f035e
commit 2b165eb6a1
40 changed files with 334 additions and 113 deletions
@@ -257,7 +257,7 @@ public class FuncMatcherTests
var code = matcher.GetCSharpCodeArguments();
// Assert
code.Should().Be("new FuncMatcher(/* Func<string?, bool> function */, WireMock.Matchers.MatchBehaviour.AcceptOnMatch)");
code.Should().Be("new WireMock.Matchers.FuncMatcher(/* Func<string?, bool> function */, WireMock.Matchers.MatchBehaviour.AcceptOnMatch)");
}
[Fact]
@@ -271,7 +271,7 @@ public class FuncMatcherTests
var code = matcher.GetCSharpCodeArguments();
// Assert
code.Should().Be("new FuncMatcher(/* Func<byte[]?, bool> function */, WireMock.Matchers.MatchBehaviour.AcceptOnMatch)");
code.Should().Be("new WireMock.Matchers.FuncMatcher(/* Func<byte[]?, bool> function */, WireMock.Matchers.MatchBehaviour.AcceptOnMatch)");
}
[Fact]