stub not working as expected #508

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

Originally created by @fernandodsanjos on GitHub (Apr 17, 2023).

Originally assigned to: @StefH on GitHub.

Should this stub not work as expected? I expect the first call to be 200 and the second 249

[{
    "Guid": "67ae335b-5d79-42dc-8ca7-236280ab9211",
    "Priority": 0,
	"Scenario": "Throttling",
	"StateIs": "Throttled",
    "SetStateTo": "Throttle",
    "Request": {
        "Body": {
        },
        "Path": {
            "Matchers": [
                {
                    "Name": "WildcardMatcher",
                    "Pattern": "/customer/123"
                }
            ]
        }
    },
    "Response": {
        "StatusCode": 249,
        "BodyAsJson": {
            "result": 249
        }
    }
},
{
    "Guid": "67ae335b-5d79-42dc-8ca7-236280ab9212",
    "Priority": 0,
	"Scenario": "Throttling",
	"StateIs": "STARTED",
    "SetStateTo": "Throttled",
    "Request": {
        "Body": {
        },
        "Path": {
            "Matchers": [
                {
                    "Name": "WildcardMatcher",
                    "Pattern": "/customer/123"
                }
            ]
        }
    },
    "Response": {
        "StatusCode": 200,
        "BodyAsJson": {
            "result": 200
        }
    }
}
]
Originally created by @fernandodsanjos on GitHub (Apr 17, 2023). Originally assigned to: @StefH on GitHub. Should this stub not work as expected? I expect the first call to be 200 and the second 249 ``` json [{ "Guid": "67ae335b-5d79-42dc-8ca7-236280ab9211", "Priority": 0, "Scenario": "Throttling", "StateIs": "Throttled", "SetStateTo": "Throttle", "Request": { "Body": { }, "Path": { "Matchers": [ { "Name": "WildcardMatcher", "Pattern": "/customer/123" } ] } }, "Response": { "StatusCode": 249, "BodyAsJson": { "result": 249 } } }, { "Guid": "67ae335b-5d79-42dc-8ca7-236280ab9212", "Priority": 0, "Scenario": "Throttling", "StateIs": "STARTED", "SetStateTo": "Throttled", "Request": { "Body": { }, "Path": { "Matchers": [ { "Name": "WildcardMatcher", "Pattern": "/customer/123" } ] } }, "Response": { "StatusCode": 200, "BodyAsJson": { "result": 200 } } } ] ```
adam added the question label 2025-12-29 15:25:36 +01:00
adam closed this issue 2025-12-29 15:25:36 +01:00
Author
Owner

@StefH commented on GitHub (May 12, 2023):

The property StateIs should be WhenStateIs. Can you try that ?

@StefH commented on GitHub (May 12, 2023): The property `StateIs` should be `WhenStateIs`. Can you try that ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#508