Hi All,
I am trying to create a contract pact at consumer end for a provider which returns zip file in response.
Currently I am setting expectations as below
.willRespondWith()
.status(HttpStatus.OK.code)
.headers(mapOf(HttpHeaders.CONTENT_TYPE to zipContent))
Is there way to set expectation for contents of zip file? For example, if I want set expectation that inside zip file there should be specific directory/filename is present. Not bothered about file contents, but if a file or directory is present or not inside the zip file.
Is there a way to set expectations like above?
Reason I want this type of validation is my service is not directly consuming zip file, but is interested in the files inside it. Atleast I want to set expectation whether certain directory and files exists inside zip file