You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an exegesis user
I want a way to test my controllers
so that I can also test certain parts of the context (does the controller set the correct status code for example)
given an exegesis controller
when my controller modifies the status code
then I should be able to asset this change with access to the context object
given an exegesis controller
when my controller returns a result to the user
then I should be able review the returned payload to ensure it conforms to specs
I could try to implement this but wondering where to start.
The text was updated successfully, but these errors were encountered:
That's maybe not the most "unit test" way to do this, though. It does have some upsides, in that you can get the full schema validation on all input parameters and on the result.
If you want something a little more "focused", maybe a function that lets you provide a controller, input parameters, and a body, and runs it and returns back the result? You could generate a dummy "TestContext" object and pass it through. It would be very nice to keep response validation here somehow, but you'd need the full OpenAPI document and either a reference to the path or a reference to the schema you expect the return type to be.
As an exegesis user
I want a way to test my controllers
so that I can also test certain parts of the context (does the controller set the correct status code for example)
given an exegesis controller
when my controller modifies the status code
then I should be able to asset this change with access to the context object
given an exegesis controller
when my controller returns a result to the user
then I should be able review the returned payload to ensure it conforms to specs
I could try to implement this but wondering where to start.
The text was updated successfully, but these errors were encountered: