-
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.
- Loading branch information
Showing
393 changed files
with
23,006 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>io.testproject</groupId> | ||
<artifactId>api-testing</artifactId> | ||
<version>1</version> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<java.version>1.8</java.version> | ||
<maven.compiler.version>3.6.0</maven.compiler.version> | ||
<karate.version>0.9.2</karate.version> | ||
<spring.version>4.3.8.RELEASE</spring.version> | ||
<spring.boot.version>1.5.16.RELEASE</spring.boot.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.intuit.karate</groupId> | ||
<artifactId>karate-junit4</artifactId> | ||
<version>${karate.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.intuit.karate</groupId> | ||
<artifactId>karate-apache</artifactId> | ||
<version>${karate.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.intuit.karate</groupId> | ||
<artifactId>karate-netty</artifactId> | ||
<version>${karate.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-dependencies</artifactId> | ||
<version>${spring.boot.version}</version> | ||
<type>pom</type> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-websocket</artifactId> | ||
<version>${spring.boot.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-security</artifactId> | ||
<version>${spring.boot.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<testResources> | ||
<testResource> | ||
<directory>src/test/java</directory> | ||
<excludes> | ||
<exclude>**/*.java</exclude> | ||
</excludes> | ||
</testResource> | ||
</testResources> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${maven.compiler.version}</version> | ||
<configuration> | ||
<encoding>UTF-8</encoding> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
<compilerArgument>-Werror</compilerArgument> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
269 changes: 269 additions & 0 deletions
269
integration-test/src/test/java/configurazione/v1/anagrafica.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,269 @@ | ||
Feature: Configurazione | ||
|
||
Background: | ||
|
||
* call read('classpath:utils/common-utils.feature') | ||
* def idIntermediario = '11111111113' | ||
* def idStazione = '11111111113_01' | ||
* def idDominio = '12345678901' | ||
* def idUnitaOperativa = '12345678901_01' | ||
* def idA2A = 'IDA2A01' | ||
* def idA2A2 = 'IDA2A02' | ||
* def ibanAccredito = 'IT02L1234512345123456789012' | ||
* def bicAccredito = 'DABAIE2D' | ||
* def ibanAccreditoPostale = 'IT02L0760112345123456789012' | ||
* def bicAccreditoPostale = 'DABAIE2C' | ||
* def ibanAccreditoErrato = 'IT00X9999900000000000000000' | ||
* def codEntrataSegreteria = 'SEGRETERIA' | ||
* def codEntrataSenzaAppoggio = 'SEGRETERIA-no-appoggio' | ||
* def codEntrataBollo = 'BOLLOT' | ||
* def codLibero = 'LIBERO' | ||
* def codSpontaneo = 'SPONTANEO' | ||
* def codDovuto = 'DOVUTO' | ||
|
||
* def basicAutenticationHeader = getBasicAuthenticationHeader( { username: govpay_backoffice_user, password: govpay_backoffice_password } ) | ||
* def gpAdminBasicAutenticationHeader = getBasicAuthenticationHeader( { username: govpay_backoffice_user, password: govpay_backoffice_password } ) | ||
* def idA2ABasicAutenticationHeader = getBasicAuthenticationHeader( { username: idA2A, password: 'password' } ) | ||
* def idA2A2BasicAutenticationHeader = getBasicAuthenticationHeader( { username: idA2A2, password: 'password' } ) | ||
* def backofficeBaseurl = getGovPayApiBaseUrl({api: 'backoffice', versione: 'v1', autenticazione: 'basic'}) | ||
|
||
Scenario: configurazione anagrafica base | ||
|
||
#### creazione intermediario | ||
* def intermediario = read('classpath:configurazione/v1/msg/intermediario.json') | ||
|
||
Given url backofficeBaseurl | ||
And path 'intermediari', idIntermediario | ||
And headers basicAutenticationHeader | ||
And request intermediario | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione stazione | ||
* def stazione = read('classpath:configurazione/v1/msg/stazione.json') | ||
|
||
Given url backofficeBaseurl | ||
And path 'intermediari', idIntermediario, 'stazioni', idStazione | ||
And headers basicAutenticationHeader | ||
And request stazione | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione dominio | ||
* def dominio = read('classpath:configurazione/v1/msg/dominio.json') | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio | ||
And headers basicAutenticationHeader | ||
And request dominio | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione unitaOperative | ||
* def unitaOperativa = read('classpath:configurazione/v1/msg/unitaOperativa.json') | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'unitaOperative', idUnitaOperativa | ||
And headers basicAutenticationHeader | ||
And request unitaOperativa | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione contiAccredito | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'contiAccredito', ibanAccredito | ||
And headers basicAutenticationHeader | ||
And request {postale:false,mybank:false,abilitato:true,bic:'#(bicAccredito)'} | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'contiAccredito', ibanAccreditoPostale | ||
And headers basicAutenticationHeader | ||
And request {postale:true,mybank:false,abilitato:true,bic:'#(bicAccreditoPostale)'} | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'contiAccredito', ibanAccreditoErrato | ||
And headers basicAutenticationHeader | ||
And request {postale:false,mybank:false,abilitato:true} | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione entrate | ||
|
||
Given url backofficeBaseurl | ||
And path 'entrate', codEntrataSegreteria | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Diritti e segreteria', tipoContabilita: 'ALTRO', codiceContabilita: '#(codEntrataSegreteria)' } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'entrate', codEntrataSegreteria | ||
And headers basicAutenticationHeader | ||
And request { ibanAccredito: '#(ibanAccredito)', ibanAppoggio: '#(ibanAccreditoPostale)', abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'entrate', codEntrataSenzaAppoggio | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Diritti e segreteria senza ibanAppoggio', tipoContabilita: 'ALTRO', codiceContabilita: '#(codEntrataSenzaAppoggio)' } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'entrate', codEntrataSenzaAppoggio | ||
And headers basicAutenticationHeader | ||
And request { ibanAccredito: '#(ibanAccredito)', ibanAppoggio: null, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'entrate', codEntrataBollo | ||
And headers basicAutenticationHeader | ||
And request { tipoContabilita: 'ALTRO', codiceContabilita: 'MBT', abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
|
||
Given url backofficeBaseurl | ||
And path 'entrate', codSpontaneo | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Pagamento spontaneo', tipoContabilita: 'ALTRO', codiceContabilita: '#(codSpontaneo)' } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'entrate', codSpontaneo | ||
And headers basicAutenticationHeader | ||
And request { ibanAccredito: '#(ibanAccredito)', ibanAppoggio: null, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
|
||
Given url backofficeBaseurl | ||
And path 'entrate', codDovuto | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Pagamento dovuto', tipoContabilita: 'ALTRO', codiceContabilita: '#(codDovuto)' } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'entrate', codDovuto | ||
And headers basicAutenticationHeader | ||
And request { ibanAccredito: '#(ibanAccredito)', ibanAppoggio: null, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione tipi pendenza | ||
|
||
Given url backofficeBaseurl | ||
And path 'tipiPendenza', codEntrataSegreteria | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Diritti e segreteria' , codificaIUV: null, tipo: 'spontanea', pagaTerzi: true, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'tipiPendenza', codEntrataSegreteria | ||
And headers basicAutenticationHeader | ||
And request { codificaIUV: '89', pagaTerzi: true, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'tipiPendenza', codEntrataSenzaAppoggio | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Diritti e segreteria senza ibanAppoggio', codificaIUV: null, tipo: 'spontanea', pagaTerzi: true, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'tipiPendenza', codEntrataSenzaAppoggio | ||
And headers basicAutenticationHeader | ||
And request { codificaIUV: '89', pagaTerzi: true, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'tipiPendenza', codEntrataBollo | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Marca da bollo telematica', codificaIUV: null, tipo: 'spontanea', pagaTerzi: true, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'tipiPendenza', codEntrataBollo | ||
And headers basicAutenticationHeader | ||
And request { codificaIUV: null, pagaTerzi: true, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'tipiPendenza', codLibero | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Pendenza libera' , codificaIUV: null, tipo: 'dovuta', pagaTerzi: false, abilitato: true} | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'tipiPendenza', codLibero | ||
And headers basicAutenticationHeader | ||
And request { codificaIUV: null, pagaTerzi: false, abilitato: true } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'tipiPendenza', codSpontaneo | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Pendenza spontanea' , codificaIUV: null, tipo: 'spontanea', pagaTerzi: false} | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'tipiPendenza', codSpontaneo | ||
And headers basicAutenticationHeader | ||
And request { codificaIUV: null, pagaTerzi: false } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'tipiPendenza', codDovuto | ||
And headers basicAutenticationHeader | ||
And request { descrizione: 'Pendenza dovuta' , codificaIUV: null, tipo: 'dovuta', pagaTerzi: false} | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
Given url backofficeBaseurl | ||
And path 'domini', idDominio, 'tipiPendenza', codDovuto | ||
And headers basicAutenticationHeader | ||
And request { codificaIUV: null, pagaTerzi: false } | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione applicazione | ||
* def applicazione = read('classpath:configurazione/v1/msg/applicazione.json') | ||
|
||
Given url backofficeBaseurl | ||
And path 'applicazioni', idA2A | ||
And headers basicAutenticationHeader | ||
And request applicazione | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### creazione applicazione | ||
* def applicazione_2 = read('classpath:configurazione/v1/msg/applicazione2.json') | ||
|
||
Given url backofficeBaseurl | ||
And path 'applicazioni', idA2A2 | ||
And headers basicAutenticationHeader | ||
And request applicazione_2 | ||
When method put | ||
Then assert responseStatus == 200 || responseStatus == 201 | ||
|
||
#### resetCache | ||
* call read('classpath:configurazione/v1/operazioni-resetCache.feature') |
Oops, something went wrong.