Hi All, for message pacts, on provider side, try...
# pact-go
s
Hi All, for message pacts, on provider side, trying to understand MessageHandler and StateHandlers, what is the difference between these two? what should happen in each of these? appreciate any help, thanks.
m
`MessageHandler`s are for mapping asynchronous/synchronous messages to the scenarios being tested. Because in message Pact we don’t have a transport, we need to register the functions that would produce the relevant message
StateHandler
s are for setting up the provider state for a given interaction (e.g. seeding a database, setting up a mock etc.)
s
thanks Matt
👍 1