-
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.
Aggiunto filtro per riscossioni.tipo al servizio dettaglio riconciliazione per filtrare le riscossioni restituite per tipo. Aggiunto filtro per tipo al servizio riscossioni. Aggiunti case test di verifica funzionamento del nuovo filtro.
- Loading branch information
Showing
22 changed files
with
715 additions
and
98 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
...ckoffice/v1/riconciliazioni/get/riconciliazione-applicazione-getbyTipoRiscossione.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,68 @@ | ||
Feature: dettaglio riconciliazione con filtro sul tipo delle riscossioni | ||
|
||
Background: | ||
|
||
* callonce read('classpath:utils/api/v1/ragioneria/bunch-riconciliazioni-v3.feature') | ||
|
||
Scenario Outline: Lettura dettaglio applicazione [<applicazione>] della riconciliazione [<idRiconciliazione>] | ||
|
||
* def applicazione = read('msg/<applicazione>') | ||
* def backofficeBaseurl = getGovPayApiBaseUrl({api: 'backoffice', versione: 'v1', autenticazione: 'basic'}) | ||
|
||
Given url backofficeBaseurl | ||
And path 'applicazioni', idA2A | ||
And headers gpAdminBasicAutenticationHeader | ||
And request applicazione | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
* call read('classpath:configurazione/v1/operazioni-resetCache.feature') | ||
|
||
Given url backofficeBaseurl | ||
And path '/incassi', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'ENTRATA' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response == read('msg/<risposta>') | ||
And match response.riscossioni[0].tipo == 'ENTRATA' | ||
|
||
Given url backofficeBaseurl | ||
And path '/incassi', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'MBT' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response.riscossioni == '#[0]' | ||
|
||
Given url backofficeBaseurl | ||
And path '/incassi', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'ENTRATA','MBT' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response == read('msg/<risposta>') | ||
And match response.riscossioni[0].tipo == 'ENTRATA' | ||
|
||
Given url backofficeBaseurl | ||
And path '/incassi', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'ENTRATA','MBT', 'ALTRO_INTERMEDIARIO' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response == read('msg/<risposta>') | ||
And match response.riscossioni[0].tipo == 'ENTRATA' | ||
|
||
Given url backofficeBaseurl | ||
And path '/incassi', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'TIPO_NON_VALIDO' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status 400 | ||
And match response == { categoria: 'RICHIESTA', codice: 'SINTASSI', descrizione: 'Richiesta non valida', dettaglio: '#notnull' } | ||
And match response.dettaglio contains 'TIPO_NON_VALIDO' | ||
|
||
|
||
Examples: | ||
| applicazione | idDominio | idRiconciliazione | httpStatus | risposta | | ||
| applicazione_dominio1.json | idDominio | idRiconciliazioneSin_DOM1_A2A | 200 | riconciliazione-singola-response.json | |
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
219 changes: 219 additions & 0 deletions
219
...test/src/test/java/test/api/backoffice/v1/riscossioni/get/riscossioni-find-byTipo.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,219 @@ | ||
Feature: Ricerca riscossioni filtrate per tipo | ||
|
||
Background: | ||
|
||
* callonce read('classpath:utils/common-utils.feature') | ||
* callonce read('classpath:configurazione/v1/anagrafica.feature') | ||
|
||
* def basicAutenticationHeader = getBasicAuthenticationHeader( { username: idA2A, password: pwdA2A } ) | ||
* def pagamentiBaseurl = getGovPayApiBaseUrl({api: 'pagamento', versione: 'v2', autenticazione: 'basic'}) | ||
|
||
* def pathServizio = '/riscossioni' | ||
|
||
Scenario: Filtro su divisione e direzione | ||
|
||
* def dataStart = getDateTime() | ||
* def idPendenza = getCurrentTimeMillis() | ||
|
||
* def pagamentoPost = read('classpath:test/api/pagamento/v2/pagamenti/post/msg/pagamento-post_spontaneo_entratariferita_bollo.json') | ||
|
||
Given url pagamentiBaseurl | ||
And headers basicAutenticationHeader | ||
And path '/pagamenti' | ||
And request pagamentoPost | ||
When method post | ||
Then status 201 | ||
|
||
* def idSession = response.idSession | ||
|
||
Given url ndpsym_url + '/psp' | ||
And path '/eseguiPagamento' | ||
And param idSession = idSession | ||
And param idDominio = idDominio | ||
And param codice = 'R01' | ||
And param riversamento = '0' | ||
When method get | ||
|
||
* call read('classpath:utils/pa-notifica-terminazione-byIdSession.feature') | ||
|
||
* def idPendenza = getCurrentTimeMillis() | ||
* def pagamentoPost = read('classpath:test/api/pagamento/v2/pagamenti/post/msg/pagamento-post_spontaneo_entratariferita_bollo.json') | ||
|
||
Given url pagamentiBaseurl | ||
And headers basicAutenticationHeader | ||
And path '/pagamenti' | ||
And request pagamentoPost | ||
When method post | ||
Then status 201 | ||
|
||
* def idSession = response.idSession | ||
|
||
Given url ndpsym_url + '/psp' | ||
And path '/eseguiPagamento' | ||
And param idSession = idSession | ||
And param idDominio = idDominio | ||
And param codice = 'R01' | ||
And param riversamento = '0' | ||
When method get | ||
|
||
* call read('classpath:utils/pa-notifica-terminazione-byIdSession.feature') | ||
|
||
* def idPendenza = getCurrentTimeMillis() | ||
* def pagamentoPost = read('classpath:test/api/pagamento/v2/pagamenti/post/msg/pagamento-post_spontaneo_entratariferita_bollo.json') | ||
|
||
Given url pagamentiBaseurl | ||
And headers basicAutenticationHeader | ||
And path '/pagamenti' | ||
And request pagamentoPost | ||
When method post | ||
Then status 201 | ||
|
||
* def idSession = response.idSession | ||
|
||
Given url ndpsym_url + '/psp' | ||
And path '/eseguiPagamento' | ||
And param idSession = idSession | ||
And param idDominio = idDominio | ||
And param codice = 'R01' | ||
And param riversamento = '0' | ||
When method get | ||
|
||
* call read('classpath:utils/pa-notifica-terminazione-byIdSession.feature') | ||
|
||
* def idPendenza = getCurrentTimeMillis() | ||
* def pagamentoPost = read('classpath:test/api/pagamento/v2/pagamenti/post/msg/pagamento-post_spontaneo_entratariferita_bollo.json') | ||
|
||
Given url pagamentiBaseurl | ||
And headers basicAutenticationHeader | ||
And path '/pagamenti' | ||
And request pagamentoPost | ||
When method post | ||
Then status 201 | ||
|
||
* def idSession = response.idSession | ||
|
||
Given url ndpsym_url + '/psp' | ||
And path '/eseguiPagamento' | ||
And param idSession = idSession | ||
And param idDominio = idDominio | ||
And param codice = 'R01' | ||
And param riversamento = '0' | ||
When method get | ||
|
||
* call read('classpath:utils/pa-notifica-terminazione-byIdSession.feature') | ||
|
||
* def dataEnd = getDateTime() | ||
|
||
# Ho avviato due pagamenti. Verifico i filtri. | ||
|
||
Given url backofficeBaseurl | ||
And path pathServizio | ||
And param dataDa = dataStart | ||
And param dataA = dataEnd | ||
And param tipo = 'MBT' | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 200 | ||
And match response == | ||
""" | ||
{ | ||
numRisultati: 4, | ||
numPagine: 1, | ||
risultatiPerPagina: 25, | ||
pagina: 1, | ||
prossimiRisultati: '##null', | ||
risultati: '#[4]' | ||
} | ||
""" | ||
And match response.risultati[0].tipo == 'MBT' | ||
And match response.risultati[1].tipo == 'MBT' | ||
And match response.risultati[2].tipo == 'MBT' | ||
And match response.risultati[3].tipo == 'MBT' | ||
|
||
Given url backofficeBaseurl | ||
And path pathServizio | ||
And param dataDa = dataStart | ||
And param dataA = dataEnd | ||
And param tipo = 'ENTRATA' | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 200 | ||
And match response == | ||
""" | ||
{ | ||
numRisultati: 4, | ||
numPagine: 1, | ||
risultatiPerPagina: 25, | ||
pagina: 1, | ||
prossimiRisultati: '##null', | ||
risultati: '#[4]' | ||
} | ||
""" | ||
And match response.risultati[0].tipo == 'ENTRATA' | ||
And match response.risultati[1].tipo == 'ENTRATA' | ||
And match response.risultati[2].tipo == 'ENTRATA' | ||
And match response.risultati[3].tipo == 'ENTRATA' | ||
|
||
Given url backofficeBaseurl | ||
And path pathServizio | ||
And param dataDa = dataStart | ||
And param dataA = dataEnd | ||
And param tipo = 'ENTRATA','MBT' | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 200 | ||
And match response == | ||
""" | ||
{ | ||
numRisultati: 8, | ||
numPagine: 1, | ||
risultatiPerPagina: 25, | ||
pagina: 1, | ||
prossimiRisultati: '##null', | ||
risultati: '#[8]' | ||
} | ||
""" | ||
And match response.risultati[0].tipo == 'MBT' | ||
And match response.risultati[1].tipo == 'ENTRATA' | ||
And match response.risultati[2].tipo == 'MBT' | ||
And match response.risultati[3].tipo == 'ENTRATA' | ||
And match response.risultati[4].tipo == 'MBT' | ||
And match response.risultati[5].tipo == 'ENTRATA' | ||
And match response.risultati[6].tipo == 'MBT' | ||
And match response.risultati[7].tipo == 'ENTRATA' | ||
|
||
|
||
Given url backofficeBaseurl | ||
And path pathServizio | ||
And param dataDa = dataStart | ||
And param dataA = dataEnd | ||
And param tipo = 'ENTRATA','MBT','ALTRO_INTERMEDIARIO' | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 200 | ||
|
||
Given url backofficeBaseurl | ||
And path pathServizio | ||
And param dataDa = dataStart | ||
And param dataA = dataEnd | ||
And param tipo = 'ALTRO_INTERMEDIARIO' | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 200 | ||
|
||
Scenario: Controllo di sintassi sul valore del filtro per tipo | ||
|
||
Given url backofficeBaseurl | ||
And path pathServizio | ||
And param tipo = 'TIPO_NON_VALIDO' | ||
And headers gpAdminBasicAutenticationHeader | ||
When method get | ||
Then status 400 | ||
And match response == { categoria: 'RICHIESTA', codice: 'SINTASSI', descrizione: 'Richiesta non valida', dettaglio: '#notnull' } | ||
And match response.dettaglio contains 'TIPO_NON_VALIDO' | ||
|
||
|
||
|
||
|
||
|
||
|
69 changes: 69 additions & 0 deletions
69
...a/test/api/ragioneria/v2/riconciliazioni/get/riconciliazione-getbyTipoRiscossione.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,69 @@ | ||
Feature: dettaglio riconciliazione con filtro sul tipo delle riscossioni | ||
|
||
Background: | ||
|
||
* callonce read('classpath:utils/api/v2/ragioneria/bunch-riconciliazioni.feature') | ||
|
||
Scenario Outline: Lettura dettaglio applicazione [<applicazione>] della riconciliazione [<idRiconciliazione>] | ||
|
||
* def applicazione = read('msg/<applicazione>') | ||
* def backofficeBaseurl = getGovPayApiBaseUrl({api: 'backoffice', versione: 'v1', autenticazione: 'basic'}) | ||
|
||
Given url backofficeBaseurl | ||
And path 'applicazioni', idA2A | ||
And headers gpAdminBasicAutenticationHeader | ||
And request applicazione | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
* call read('classpath:configurazione/v1/operazioni-resetCache.feature') | ||
* def ragioneriaBaseurl = getGovPayApiBaseUrl({api: 'ragioneria', versione: 'v2', autenticazione: 'basic'}) | ||
|
||
Given url ragioneriaBaseurl | ||
And path '/riconciliazioni', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'ENTRATA' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response == <risposta> | ||
And match response.riscossioni[0].tipo == 'ENTRATA' | ||
|
||
Given url ragioneriaBaseurl | ||
And path '/riconciliazioni', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'MBT' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response.riscossioni == '#[0]' | ||
|
||
Given url ragioneriaBaseurl | ||
And path '/riconciliazioni', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'ENTRATA','MBT' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response == <risposta> | ||
And match response.riscossioni[0].tipo == 'ENTRATA' | ||
|
||
Given url ragioneriaBaseurl | ||
And path '/riconciliazioni', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'ENTRATA','MBT', 'ALTRO_INTERMEDIARIO' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status <httpStatus> | ||
And match response == <risposta> | ||
And match response.riscossioni[0].tipo == 'ENTRATA' | ||
|
||
Given url ragioneriaBaseurl | ||
And path '/riconciliazioni', <idDominio>, <idRiconciliazione> | ||
And param riscossioni.tipo = 'TIPO_NON_VALIDO' | ||
And headers idA2ABasicAutenticationHeader | ||
When method get | ||
Then status 400 | ||
And match response == { categoria: 'RICHIESTA', codice: 'SINTASSI', descrizione: 'Richiesta non valida', dettaglio: '#notnull' } | ||
And match response.dettaglio contains 'TIPO_NON_VALIDO' | ||
|
||
|
||
Examples: | ||
| applicazione | idDominio | idRiconciliazione | httpStatus | risposta | | ||
| applicazione_auth.json | idDominio | idRiconciliazioneSin_DOM1_A2A | 200 | riconciliazioneSin_DOM1_A2A | |
Oops, something went wrong.