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
The method parameterFromProviderState in the class FormPostBuilder does not actually allow for values to be delivered from the provider when doing provider tests. This is due to the method Generators.findContentTypeHandler returning null for the content type application/x-www-form-urlencoded, which is what is provided by the FormPostBuilder class.
The result is that when specifying a FormPostBuilder.parameterFromProviderState, the parameter appears with the expression in the contract JSON, but when a provider test provides a value for the expression it is not evaluated.
Indeed looking at the Generators class the only content type supported there is application/json. Is the intent that parameters from Provider states only work for json bodies? Or should the Generators class also support application/x-www-form-urlencoded?
The text was updated successfully, but these errors were encountered:
I added support for generators with form URL encoded bodies. There was also a bug with the FormPostBuilder, so any Pact files will need to be generated with the corrected builder.
The method
parameterFromProviderState
in the classFormPostBuilder
does not actually allow for values to be delivered from the provider when doing provider tests. This is due to the methodGenerators.findContentTypeHandler
returning null for the content typeapplication/x-www-form-urlencoded
, which is what is provided by theFormPostBuilder
class.The result is that when specifying a
FormPostBuilder.parameterFromProviderState
, the parameter appears with the expression in the contract JSON, but when a provider test provides a value for the expression it is not evaluated.Indeed looking at the
Generators
class the only content type supported there isapplication/json
. Is the intent that parameters from Provider states only work for json bodies? Or should theGenerators
class also supportapplication/x-www-form-urlencoded
?The text was updated successfully, but these errors were encountered: