diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-06-28 10:29:50 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-06-28 10:29:50 +0200 |
commit | c43f9764b2132ce54a491c1daeeafe6aa4851ef5 (patch) | |
tree | 3f900f37b612fffd11a6069dd814f16474957053 /src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest | |
parent | 7eb6db5c837db22055b51988031920599a7e7270 (diff) | |
download | moa-zs-c43f9764b2132ce54a491c1daeeafe6aa4851ef5.tar.gz moa-zs-c43f9764b2132ce54a491c1daeeafe6aa4851ef5.tar.bz2 moa-zs-c43f9764b2132ce54a491c1daeeafe6aa4851ef5.zip |
Separate Test Suite into Unit- And Integration Tests
Per default, integration tests are excluded from build. They can be
included with the `-P integration-test` argument.
- Pom: Add maven profile for integration tests.
- Rename integration tests (add `IT` prefix).
- Move Resources into IT* folders.
- Add MsgClientTest to test suite and add assertions to each test case.
Diffstat (limited to 'src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest')
6 files changed, 320 insertions, 0 deletions
diff --git a/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/formallyIncorrectDeliveryRequest.soap b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/formallyIncorrectDeliveryRequest.soap new file mode 100644 index 0000000..0570005 --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/formallyIncorrectDeliveryRequest.soap @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope + xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#" + xmlns:p="http://reference.e-government.gv.at/namespace/zustellung/mzs/persondata#" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<soapenv:Body> +<mzs:DeliveryRequest> + <mzs:Sender> + <mzs:ProfileID>SampleProfile2</mzs:ProfileID> + <mzs:SignatureKeyID></mzs:SignatureKeyID> + </mzs:Sender> + <mzs:Receiver> + <p:PhysicalPerson> + <p:Name> + <p:GivenName>Maxi</p:GivenName> + <p:FamilyName>Mustermann1</p:FamilyName> + </p:Name> + <p:DateOfBirth>1984-01-24</p:DateOfBirth> + </p:PhysicalPerson> + <p:PostalAddress> + <p:CountryCode>AT</p:CountryCode> + <p:PostalCode>1010</p:PostalCode> + <p:Municipality>Wien</p:Municipality> + <p:DeliveryAddress> + <p:StreetName>Muststrasse</p:StreetName> + <p:BuildingNumber>10</p:BuildingNumber> + </p:DeliveryAddress> + </p:PostalAddress> + </mzs:Receiver> + <mzs:MetaData> + <mzs:AppDeliveryID>formally-incorrect-delivery-request-id</mzs:AppDeliveryID> + <mzs:DeliveryQuality>nonRSa</mzs:DeliveryQuality> + <mzs:RequiresEncryption>false</mzs:RequiresEncryption> + </mzs:MetaData> + <mzs:XMLDocument> + <mzs:XMLContent> + <message> + <subject>Hello There!</subject> + <body> + <p>How are you</p> + <p>Nice to hear from you!</p> + <p>Regards, V</p> + </body> + </message> + </mzs:XMLContent> + <mzs:XMLProfileID>deckblatt</mzs:XMLProfileID> + </mzs:XMLDocument> + <!-- I forgot to close DeliveryRequest --> +<!-- </mzs:DeliveryRequest> --> +</soapenv:Body> +</soapenv:Envelope> diff --git a/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingAppDeliveryId.soap b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingAppDeliveryId.soap new file mode 100644 index 0000000..e481caa --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingAppDeliveryId.soap @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope + xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#" + xmlns:p="http://reference.e-government.gv.at/namespace/zustellung/mzs/persondata#" + xmlns:msg="http://reference.e-government.gv.at/namespace/zustellung/msg/phase2/20181206#" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <mzs:DeliveryRequest> + <mzs:Sender> + <p:CorporateBody> + <p:Identification> + <p:Value>kkvj693+tw99uW8UPuEK9en1LzZItkylPajkUUyJJDWQB78VGPkAuhCEk+TD12yQDD/WRglsf+JfQpjubIs/4l/ptluJ9teF3nwkNlu5Dm7mIjzgW1qxrDyomCmPvVxTWOCBuMUbOWRZBhOq+KvDQAu9Vv9KnqSfjYeDZrpHYu4=</p:Value> + <p:Type>urn:publicid:gv:at:cemtoken</p:Type> + </p:Identification> + <p:FullName>Bundesministerium für Testzwecke</p:FullName> + </p:CorporateBody> + <mzs:WebserviceURL>https://authority.gv.at/delivery_notification</mzs:WebserviceURL> + </mzs:Sender> + <mzs:Receiver> + <p:PhysicalPerson> + <p:Name> + <p:GivenName>Maxi</p:GivenName> + <p:FamilyName>Mustermann1</p:FamilyName> + </p:Name> + <p:DateOfBirth>1984-01-24</p:DateOfBirth> + </p:PhysicalPerson> + <p:PostalAddress> + <p:CountryCode>AT</p:CountryCode> + <p:PostalCode>1010</p:PostalCode> + <p:Municipality>Wien</p:Municipality> + <p:DeliveryAddress> + <p:StreetName>Muststrasse</p:StreetName> + <p:BuildingNumber>10</p:BuildingNumber> + </p:DeliveryAddress> + </p:PostalAddress> + </mzs:Receiver> + <msg:MetaData> + <msg:Subject>WichtigeMitteilung</msg:Subject> + <msg:DeliveryQuality>RSa</msg:DeliveryQuality> + </msg:MetaData> + <mzs:Payload> + <mzs:DocumentReference>https://authority.gv.at/files/73bdf969781ba41fa07df1ff8439cf685c0db1c3</mzs:DocumentReference> + <mzs:FileName>brief.xml</mzs:FileName> + <mzs:MIMEType>text/xml</mzs:MIMEType> + <msg:CheckSum> + <msg:AlgorithmID>SHA1</msg:AlgorithmID> + <msg:Value>9b972c70fdaf5e1b26b3387c87b0ffb72e5940b6</msg:Value> + </msg:CheckSum> + <mzs:Size>123401</mzs:Size> + </mzs:Payload> + </mzs:DeliveryRequest> + </soapenv:Body> +</soapenv:Envelope> diff --git a/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingMetaData.soap b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingMetaData.soap new file mode 100644 index 0000000..cf55d6d --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingMetaData.soap @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope + xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#" + xmlns:p="http://reference.e-government.gv.at/namespace/zustellung/mzs/persondata#" + xmlns:msg="http://reference.e-government.gv.at/namespace/zustellung/msg/phase2/20181206#" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <mzs:DeliveryRequest> + <mzs:Sender> + <p:CorporateBody> + <p:Identification> + <p:Value>kkvj693+tw99uW8UPuEK9en1LzZItkylPajkUUyJJDWQB78VGPkAuhCEk+TD12yQDD/WRglsf+JfQpjubIs/4l/ptluJ9teF3nwkNlu5Dm7mIjzgW1qxrDyomCmPvVxTWOCBuMUbOWRZBhOq+KvDQAu9Vv9KnqSfjYeDZrpHYu4=</p:Value> + <p:Type>urn:publicid:gv:at:cemtoken</p:Type> + </p:Identification> + <p:FullName>Bundesministerium für Testzwecke</p:FullName> + </p:CorporateBody> + <mzs:WebserviceURL>https://authority.gv.at/delivery_notification</mzs:WebserviceURL> + </mzs:Sender> + <mzs:Receiver> + <p:PhysicalPerson> + <p:Name> + <p:GivenName>Maxi</p:GivenName> + <p:FamilyName>Mustermann1</p:FamilyName> + </p:Name> + <p:DateOfBirth>1984-01-24</p:DateOfBirth> + </p:PhysicalPerson> + <p:PostalAddress> + <p:CountryCode>AT</p:CountryCode> + <p:PostalCode>1010</p:PostalCode> + <p:Municipality>Wien</p:Municipality> + <p:DeliveryAddress> + <p:StreetName>Muststrasse</p:StreetName> + <p:BuildingNumber>10</p:BuildingNumber> + </p:DeliveryAddress> + </p:PostalAddress> + </mzs:Receiver> + <mzs:Payload> + <mzs:DocumentReference>https://authority.gv.at/files/73bdf969781ba41fa07df1ff8439cf685c0db1c3</mzs:DocumentReference> + <mzs:FileName>brief.xml</mzs:FileName> + <mzs:MIMEType>text/xml</mzs:MIMEType> + <msg:CheckSum> + <msg:AlgorithmID>SHA1</msg:AlgorithmID> + <msg:Value>9b972c70fdaf5e1b26b3387c87b0ffb72e5940b6</msg:Value> + </msg:CheckSum> + <mzs:Size>123401</mzs:Size> + </mzs:Payload> + </mzs:DeliveryRequest> + </soapenv:Body> +</soapenv:Envelope> diff --git a/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingSender.soap b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingSender.soap new file mode 100644 index 0000000..62cda34 --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/missingSender.soap @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope + xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#" + xmlns:p="http://reference.e-government.gv.at/namespace/zustellung/mzs/persondata#" + xmlns:msg="http://reference.e-government.gv.at/namespace/zustellung/msg/phase2/20181206#" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <mzs:DeliveryRequest> + <mzs:Receiver> + <p:PhysicalPerson> + <p:Name> + <p:GivenName>Maxi</p:GivenName> + <p:FamilyName>Mustermann1</p:FamilyName> + </p:Name> + <p:DateOfBirth>1984-01-24</p:DateOfBirth> + </p:PhysicalPerson> + <p:PostalAddress> + <p:CountryCode>AT</p:CountryCode> + <p:PostalCode>1010</p:PostalCode> + <p:Municipality>Wien</p:Municipality> + <p:DeliveryAddress> + <p:StreetName>Muststrasse</p:StreetName> + <p:BuildingNumber>10</p:BuildingNumber> + </p:DeliveryAddress> + </p:PostalAddress> + </mzs:Receiver> + <msg:MetaData> + <msg:AppDeliveryID>valid-delivery-request-id</msg:AppDeliveryID> + <msg:Subject>WichtigeMitteilung</msg:Subject> + <msg:DeliveryQuality>RSa</msg:DeliveryQuality> + </msg:MetaData> + <mzs:Payload> + <mzs:DocumentReference>https://authority.gv.at/files/73bdf969781ba41fa07df1ff8439cf685c0db1c3</mzs:DocumentReference> + <mzs:FileName>brief.xml</mzs:FileName> + <mzs:MIMEType>text/xml</mzs:MIMEType> + <msg:CheckSum> + <msg:AlgorithmID>SHA1</msg:AlgorithmID> + <msg:Value>9b972c70fdaf5e1b26b3387c87b0ffb72e5940b6</msg:Value> + </msg:CheckSum> + <mzs:Size>123401</mzs:Size> + </mzs:Payload> + </mzs:DeliveryRequest> + </soapenv:Body> +</soapenv:Envelope> diff --git a/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/profileAndCorporateBody.soap b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/profileAndCorporateBody.soap new file mode 100644 index 0000000..3e52062 --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/profileAndCorporateBody.soap @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope + xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#" + xmlns:p="http://reference.e-government.gv.at/namespace/zustellung/mzs/persondata#" + xmlns:msg="http://reference.e-government.gv.at/namespace/zustellung/msg/phase2/20181206#" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <mzs:DeliveryRequest> + <mzs:Sender> + <msg:SenderProfile> + <msg:ProfileID>132456</msg:ProfileID> + </msg:SenderProfile> + <p:CorporateBody> + <p:Identification> + <p:Value>kkvj693+tw99uW8UPuEK9en1LzZItkylPajkUUyJJDWQB78VGPkAuhCEk+TD12yQDD/WRglsf+JfQpjubIs/4l/ptluJ9teF3nwkNlu5Dm7mIjzgW1qxrDyomCmPvVxTWOCBuMUbOWRZBhOq+KvDQAu9Vv9KnqSfjYeDZrpHYu4=</p:Value> + <p:Type>urn:publicid:gv:at:cemtoken</p:Type> + </p:Identification> + <p:FullName>Bundesministerium für Testzwecke</p:FullName> + </p:CorporateBody> + <mzs:WebserviceURL>https://authority.gv.at/delivery_notification</mzs:WebserviceURL> + </mzs:Sender> + <mzs:Receiver> + <p:PhysicalPerson> + <p:Name> + <p:GivenName>Maxi</p:GivenName> + <p:FamilyName>Mustermann1</p:FamilyName> + </p:Name> + <p:DateOfBirth>1984-01-24</p:DateOfBirth> + </p:PhysicalPerson> + <p:PostalAddress> + <p:CountryCode>AT</p:CountryCode> + <p:PostalCode>1010</p:PostalCode> + <p:Municipality>Wien</p:Municipality> + <p:DeliveryAddress> + <p:StreetName>Muststrasse</p:StreetName> + <p:BuildingNumber>10</p:BuildingNumber> + </p:DeliveryAddress> + </p:PostalAddress> + </mzs:Receiver> + <msg:MetaData> + <msg:AppDeliveryID>valid-delivery-request-id</msg:AppDeliveryID> + <msg:Subject>WichtigeMitteilung</msg:Subject> + <msg:DeliveryQuality>RSa</msg:DeliveryQuality> + </msg:MetaData> + <mzs:Payload> + <mzs:DocumentReference>https://authority.gv.at/files/73bdf969781ba41fa07df1ff8439cf685c0db1c3</mzs:DocumentReference> + <mzs:FileName>brief.xml</mzs:FileName> + <mzs:MIMEType>text/xml</mzs:MIMEType> + <msg:CheckSum> + <msg:AlgorithmID>SHA1</msg:AlgorithmID> + <msg:Value>9b972c70fdaf5e1b26b3387c87b0ffb72e5940b6</msg:Value> + </msg:CheckSum> + <mzs:Size>123401</mzs:Size> + </mzs:Payload> + </mzs:DeliveryRequest> + </soapenv:Body> +</soapenv:Envelope> diff --git a/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/validDeliveryRequest.soap b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/validDeliveryRequest.soap new file mode 100644 index 0000000..519749c --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/ITMzsServiceTest/validDeliveryRequest.soap @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope + xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#" + xmlns:p="http://reference.e-government.gv.at/namespace/zustellung/mzs/persondata#" + xmlns:msg="http://reference.e-government.gv.at/namespace/zustellung/msg/phase2/20181206#" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <mzs:DeliveryRequest> + <mzs:Sender> + <p:CorporateBody> + <p:Identification> + <p:Value>kkvj693+tw99uW8UPuEK9en1LzZItkylPajkUUyJJDWQB78VGPkAuhCEk+TD12yQDD/WRglsf+JfQpjubIs/4l/ptluJ9teF3nwkNlu5Dm7mIjzgW1qxrDyomCmPvVxTWOCBuMUbOWRZBhOq+KvDQAu9Vv9KnqSfjYeDZrpHYu4=</p:Value> + <p:Type>urn:publicid:gv:at:cemtoken</p:Type> + </p:Identification> + <p:FullName>Bundesministerium für Testzwecke</p:FullName> + </p:CorporateBody> + <mzs:WebserviceURL>https://authority.gv.at/delivery_notification</mzs:WebserviceURL> + </mzs:Sender> + <mzs:Receiver> + <p:PhysicalPerson> + <p:Name> + <p:GivenName>Maxi</p:GivenName> + <p:FamilyName>Mustermann1</p:FamilyName> + </p:Name> + <p:DateOfBirth>1984-01-24</p:DateOfBirth> + </p:PhysicalPerson> + <p:PostalAddress> + <p:CountryCode>AT</p:CountryCode> + <p:PostalCode>1010</p:PostalCode> + <p:Municipality>Wien</p:Municipality> + <p:DeliveryAddress> + <p:StreetName>Muststrasse</p:StreetName> + <p:BuildingNumber>10</p:BuildingNumber> + </p:DeliveryAddress> + </p:PostalAddress> + </mzs:Receiver> + <msg:MetaData> + <msg:AppDeliveryID>valid-delivery-request-id</msg:AppDeliveryID> + <msg:Subject>WichtigeMitteilung</msg:Subject> + <msg:DeliveryQuality>RSa</msg:DeliveryQuality> + </msg:MetaData> + <mzs:Payload> + <mzs:DocumentReference>https://authority.gv.at/files/73bdf969781ba41fa07df1ff8439cf685c0db1c3</mzs:DocumentReference> + <mzs:FileName>brief.xml</mzs:FileName> + <mzs:MIMEType>text/xml</mzs:MIMEType> + <msg:CheckSum> + <msg:AlgorithmID>SHA1</msg:AlgorithmID> + <msg:Value>9b972c70fdaf5e1b26b3387c87b0ffb72e5940b6</msg:Value> + </msg:CheckSum> + <mzs:Size>123401</mzs:Size> + </mzs:Payload> + </mzs:DeliveryRequest> + </soapenv:Body> +</soapenv:Envelope> |