Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Expose scenario states #163

Closed
benjamin-bader opened this issue Jul 5, 2018 · 4 comments
Closed

Feature: Expose scenario states #163

benjamin-bader opened this issue Jul 5, 2018 · 4 comments

Comments

@benjamin-bader
Copy link

I'd like to be able to ask the server what the current state is for a given feature, for example to concisely verify that all expected requests were received, e.g.

Check.That(server.Scenarios["oauth flow"].State).Is("finished");

One could get the same effect today by groveling through the LogEntries, but this is tedious and duplicates the logical chain set up by the scenario itself.

@StefH
Copy link
Collaborator

StefH commented Jul 8, 2018

Good idea.

I need to extend the admin api with some get request to retrieve the state from a certain scenario.

Also add this logic to the fluent interface.

@StefH
Copy link
Collaborator

StefH commented Jul 17, 2018

Hello @benjamin-bader,

I've added some functionality in this branch, you can already take a look how it can be used as you proposed here:
https://github.com/WireMock-Net/WireMock.Net/blob/Expose_scenario_states/test/WireMock.Net.Tests/StatefulBehaviorTests.cs#L66

@benjamin-bader
Copy link
Author

Oh, cool! I was going to try my hand at this, but you've beaten me to it. Thank you for taking the effort!

@StefH
Copy link
Collaborator

StefH commented Jul 18, 2018

OK, I'll change the code and create a new NuGet in some time...

@StefH StefH closed this as completed Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants