mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Stateful support #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dmtrrk on GitHub (Oct 3, 2017).
Originally assigned to: @StefH on GitHub.
Is there a plan to support stateful behavior functionality?
@StefH commented on GitHub (Oct 4, 2017):
No plans, until your question ;-)
I'll take a look at the idea and check if this can be implemented in WireMock.net
@dmtrrk commented on GitHub (Oct 4, 2017):
I have implemented this functionality for in-process solution. but I can't create PR as have no permissions.
Could you give me permissions to push a new branch?
@dmtrrk commented on GitHub (Oct 4, 2017):
Mostly the idea is simply to add such syntax:
@StefH commented on GitHub (Oct 4, 2017):
What you can do is fork this project, and then build your changes there and then make a PR to this project. Or what you also can do, is zip your changes and provide this code to me.
@dmtrrk commented on GitHub (Oct 4, 2017):
Created a PR #49
@StefH commented on GitHub (Oct 4, 2017):
I see, currently reviewing and testing.
@dmtrrk commented on GitHub (Oct 4, 2017):
had to add 1 update: in case the next state is not specified - the current will not be changed (will not be set to NULL)
@StefH commented on GitHub (Oct 5, 2017):
I will look, however I'm also looking to build in support for multiple states or scenarios.
@dmtrrk commented on GitHub (Oct 5, 2017):
what do you mean by multiple states? do you have any examples?
are you talking about something similar to
inScenario("To do list")?Do you want to keep backward compatibility?
@StefH commented on GitHub (Oct 5, 2017):
Multiple states : Be able to define multiple states which will behave.
Scenarios : I think I like the original idea from wiremock.org I'm building the code based on your PR.
@dmtrrk commented on GitHub (Oct 5, 2017):
I see. something like
WhenState(params object[] states)?do you plan to keep backward compatibility?
@dmtrrk commented on GitHub (Oct 6, 2017):
in case you decided what is the expected semantic and contract I can update PR
@StefH commented on GitHub (Oct 6, 2017):
Thanks for the offer, but currently I'm trying to build it according to my idea, I'll let you know if I need help.
Multiple states means ; multiple parallel states should be supported, like unit-test as defined below should be fine:
@dmtrrk commented on GitHub (Oct 6, 2017):
looks good. will use this syntax meanwhile.
thank you
@StefH commented on GitHub (Oct 7, 2017):
See my code at https://github.com/WireMock-Net/WireMock.Net/tree/stateful-behavior
I'll extend this code to also support the JSON for this...
@StefH commented on GitHub (Oct 7, 2017):
Code merged to master, still need to add some text to wiki...
@StefH commented on GitHub (Oct 7, 2017):
WIKI --> https://github.com/WireMock-Net/WireMock.Net/wiki/Scenarios-and-States
@dmtrrk commented on GitHub (Oct 9, 2017):
looks great!
do you have any plans to update the package on nuget.org?
@StefH commented on GitHub (Oct 9, 2017):
Yes, I think I can release version 1.0.2.4 on NuGet. I keep you informed here when.
@StefH commented on GitHub (Oct 10, 2017):
Done
@dmtrrk commented on GitHub (Oct 12, 2017):
thanks a lot!