Last active
October 31, 2015 12:21
-
-
Save agnaldo4j/ff094cf35ca6333b4e18 to your computer and use it in GitHub Desktop.
Estrutura testes de integração para API. Objetivo esconder ferramentaria e simplificar os testes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.opportunity.simple.restapi.user | |
import com.opportunity.simple.restapi.basic.BasicBehaviour | |
class UserSpec extends BasicBehaviour { | |
"The user endpoint" should { | |
args(sequential=true) | |
"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() = { | |
pending | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment