JsonResponse Command

TODO

Should fail if response body is missing

Given there is resource at /hello
And it responds with no body When following fixture is executed:
<rest:request>
	<rest:get>/hello</rest:get>
	<rest:jsonResponse>{ "greeting": "Hello World" }</rest:jsonResponse>
</rest:request>		
		
Then it should produce following output:
/hello
{ 
  "greeting": "Hello World" 
}
(not set)

Should fail if response body does not match

Given there is resource at /hello
And it responds with body
{ "greeting": "Hello You" }

When following fixture is executed:
<rest:request>
	<rest:get>/hello</rest:get>
	<rest:jsonResponse>{ "greeting": "Hello World" }</rest:jsonResponse>
</rest:request>		
		
Then it should produce following output:
/hello
{ 
  "greeting": "Hello World" 
}
{ 
  "greeting": "Hello You" 
}

Should be successful if body matches

Given there is resource at /hello
And it responds with body
{ "greeting": "Hello World" }

When following fixture is executed:
<rest:request>
	<rest:get>/hello</rest:get>
	<rest:jsonResponse>{ "greeting": "Hello World" }</rest:jsonResponse>
</rest:request>		
		
Then it should produce following output:
/hello
{ 
  "greeting": "Hello World" 
}