-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '3.1.x' of github.com:link-it/GovPay into 3.1.x
- Loading branch information
Showing
10 changed files
with
256 additions
and
64 deletions.
There are no files selected for viewing
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
86 changes: 86 additions & 0 deletions
86
...ration-test/src/test/java/test/api/pagamento/v2/pagamenti/post/pagamento-carrello.feature
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
Feature: Pagamento carrello | ||
|
||
Background: | ||
|
||
* callonce read('classpath:utils/common-utils.feature') | ||
* callonce read('classpath:configurazione/v1/anagrafica.feature') | ||
|
||
* def pendenzeBaseurl = getGovPayApiBaseUrl({api: 'pendenze', versione: 'v2', autenticazione: 'basic'}) | ||
* def basicAutenticationHeader = getBasicAuthenticationHeader( { username: idA2A, password: 'password' } ) | ||
|
||
* def idPendenza = getCurrentTimeMillis() | ||
* def pendenza = read('classpath:test/api/pendenza/v2/pendenze/put/msg/pendenza-put_monovoce_riferimento.json') | ||
|
||
Given url pendenzeBaseurl | ||
And path 'pendenze', idA2A, idPendenza | ||
And headers basicAutenticationHeader | ||
And request pendenza | ||
When method put | ||
Then status 201 | ||
* def numeroAvviso = response.numeroAvviso | ||
|
||
* def idPendenza = getCurrentTimeMillis() | ||
* def idPendenza1 = idPendenza | ||
* def pendenza = read('classpath:test/api/pendenza/v2/pendenze/put/msg/pendenza-put_monovoce_riferimento.json') | ||
|
||
Given url pendenzeBaseurl | ||
And path 'pendenze', idA2A, idPendenza1 | ||
And headers basicAutenticationHeader | ||
And request pendenza | ||
When method put | ||
Then status 201 | ||
|
||
* def idPendenza2 = getCurrentTimeMillis() | ||
|
||
* def pagamentoPost = read('classpath:test/api/pagamento/v2/pagamenti/post/msg/pagamento-post_carrello.json') | ||
* set pagamentoPost.soggettoVersante = | ||
""" | ||
{ | ||
"tipo": "F", | ||
"identificativo": "RSSMRA30A01H501I", | ||
"anagrafica": "Mario Rossi", | ||
"indirizzo": "Piazza della Vittoria", | ||
"civico": "10/A", | ||
"cap": 0, | ||
"localita": "Roma", | ||
"provincia": "Roma", | ||
"nazione": "IT", | ||
"email": "mario.rossi@host.eu", | ||
"cellulare": "+39 000-1234567" | ||
} | ||
""" | ||
|
||
Scenario: Pagamento carrello anonimo | ||
|
||
* def pagamentiBaseurl = getGovPayApiBaseUrl({api: 'pagamento', versione: 'v2', autenticazione: 'public'}) | ||
|
||
Given url pagamentiBaseurl | ||
And path '/pagamenti' | ||
And request pagamentoPost | ||
When method post | ||
Then status 201 | ||
And match response == { id: '#notnull', location: '#notnull', redirect: '#notnull', idSession: '#notnull' } | ||
|
||
Given url pagamentiBaseurl | ||
And path '/pagamenti/byIdSession/', response.idSession | ||
When method get | ||
Then status 200 | ||
And match response.rpp[0].rpt.soggettoVersante == | ||
""" | ||
{ | ||
identificativoUnivocoVersante: { | ||
tipoIdentificativoUnivoco: 'F', | ||
codiceIdentificativoUnivoco: 'ANONIMO' | ||
}, | ||
anagraficaVersante: 'ANONIMO', | ||
indirizzoVersante: null, | ||
civicoVersante: null, | ||
capVersante: null, | ||
localitaVersante: null, | ||
provinciaVersante: null, | ||
nazioneVersante: null, | ||
e-mailVersante: '#(pagamentoPost.soggettoVersante.email)' | ||
} | ||
""" | ||
And match response.rpp[0].rpt.soggettoPagatore == null | ||
And match response.rpp[1].rpt.soggettoPagatore == null |
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
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
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
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
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
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
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
Oops, something went wrong.