Skip to content

Instantly share code, notes, and snippets.

@muhammadghazali
Created April 18, 2013 16:00
Show Gist options
  • Save muhammadghazali/5413912 to your computer and use it in GitHub Desktop.
Save muhammadghazali/5413912 to your computer and use it in GitHub Desktop.
Get Event List Acceptance Test

Scenario 1: Event List request should return response in JSON

Given Event List resource is accessible

And Event List resource is accessible

When the client request the Event List in JSON

Then the Web API should return Event List in JSON

And returned response is should be accompanied by properties like resource url, page, pages, pageSize, total

And the maximum of number of item on the Event List is 15 Event

Scenario 2: Event List request should return response in XML

Given Event List resource is accessible

And Event List resource is accessible

When the client request the Event List in XML

Then the Web API should return Event List in XML

And returned response is should be accompanied by properties like resource url, page, pages, pageSize, total

And the maximum of number of item on the Event List is 15 Event

Scenario 3: Unsupported Content-Type should return HTTP 406 code

Given the Web API only support JSON and XML for the response

When the client request the resource with Content-Type other than JSON or XML

Then the Web API should return HTTP 406 code

And returned reponse should be contained an client error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment