Skip to content

Instantly share code, notes, and snippets.



Last active Oct 31, 2015
What would you like to do?
Estrutura testes de integração para API. Objetivo esconder ferramentaria e simplificar os testes
package com.opportunity.simple.restapi.user
import com.opportunity.simple.restapi.basic.BasicBehaviour
class UserSpec extends BasicBehaviour {
"The user endpoint" should {
"Create new user" ! userEndpointForTest().executeTestCreateNewUser()
"Try create a user with same email" ! userEndpointForTest().executeTestTryCreateAUserWithSameEmail()
case class userEndpointForTest() {
def executeTestCreateNewUser() = {
val response = sendToEndpointByPost(UserMessage.endpoint(), UserMessage.happyDay())
verifyResponseCodeOk( response )
def executeTestTryCreateAUserWithSameEmail() = {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment