11package com .unzer .payment .business ;
22
3- import com .unzer .payment .*;
3+ import com .unzer .payment .Authorization ;
4+ import com .unzer .payment .BaseTransaction ;
5+ import com .unzer .payment .Basket ;
6+ import com .unzer .payment .Customer ;
7+ import com .unzer .payment .Payment ;
8+ import com .unzer .payment .Unzer ;
49import com .unzer .payment .communication .HttpCommunicationException ;
510import com .unzer .payment .marketplace .MarketplaceAuthorization ;
611import com .unzer .payment .marketplace .MarketplacePayment ;
2429import static org .junit .jupiter .api .Assertions .assertNotNull ;
2530
2631
27- public class AuthorizationTest extends AbstractPaymentTest {
32+ class AuthorizationTest extends AbstractPaymentTest {
2833
2934 @ Test
30- public void testAuthorizeWithAuthorizationObject () throws MalformedURLException , HttpCommunicationException {
35+ void testAuthorizeWithAuthorizationObject () throws MalformedURLException , HttpCommunicationException {
3136 Authorization authorize = getUnzer ().authorize (getAuthorization (createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), false ));
3237 assertNotNull (authorize .getId ());
3338 assertNotNull (authorize );
@@ -36,7 +41,7 @@ public void testAuthorizeWithAuthorizationObject() throws MalformedURLException,
3641 }
3742
3843 @ Test
39- public void testAuthorizeWithTypeId () throws MalformedURLException , HttpCommunicationException {
44+ void testAuthorizeWithTypeId () throws MalformedURLException , HttpCommunicationException {
4045 Authorization authorize = getUnzer ().authorize (BigDecimal .ONE , Currency .getInstance ("EUR" ), createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), new URL ("https://www.unzer.com" ), false );
4146 assertNotNull (authorize );
4247 assertNotNull (authorize .getId ());
@@ -45,7 +50,7 @@ public void testAuthorizeWithTypeId() throws MalformedURLException, HttpCommunic
4550 }
4651
4752 @ Test
48- public void testAuthorizeSuccess () throws MalformedURLException , HttpCommunicationException {
53+ void testAuthorizeSuccess () throws MalformedURLException , HttpCommunicationException {
4954 Authorization authorize = getUnzer ().authorize (BigDecimal .ONE , Currency .getInstance ("EUR" ), createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), new URL ("https://www.unzer.com" ), false );
5055 assertNotNull (authorize );
5156 assertNotNull (authorize .getId ());
@@ -55,7 +60,7 @@ public void testAuthorizeSuccess() throws MalformedURLException, HttpCommunicati
5560 }
5661
5762 @ Test
58- public void testAuthorizeWithPaymentType () throws MalformedURLException , HttpCommunicationException {
63+ void testAuthorizeWithPaymentType () throws MalformedURLException , HttpCommunicationException {
5964 Unzer unzer = getUnzer (Keys .DEFAULT );
6065 LocalDate locaDateNow = LocalDate .now ();
6166 Card card = new Card ("4444333322221111" , "12/" + (locaDateNow .getYear () + 1 ));
@@ -67,7 +72,7 @@ public void testAuthorizeWithPaymentType() throws MalformedURLException, HttpCom
6772 }
6873
6974 @ Test
70- public void testAuthorizeReturnPaymentTypeAndCustomer () throws MalformedURLException , HttpCommunicationException {
75+ void testAuthorizeReturnPaymentTypeAndCustomer () throws MalformedURLException , HttpCommunicationException {
7176 Unzer unzer = getUnzer (Keys .DEFAULT );
7277 LocalDate locaDateNow = LocalDate .now ();
7378 Card card = new Card ("4444333322221111" , "12/" + (locaDateNow .getYear () + 1 ));
@@ -82,7 +87,7 @@ public void testAuthorizeReturnPaymentTypeAndCustomer() throws MalformedURLExcep
8287 }
8388
8489 @ Test
85- public void testAuthorizeWithCustomerId () throws MalformedURLException , HttpCommunicationException , ParseException {
90+ void testAuthorizeWithCustomerId () throws MalformedURLException , HttpCommunicationException , ParseException {
8691 Customer customer = getUnzer ().createCustomer (getMaximumCustomer (generateUuid ()));
8792 Authorization authorize = getUnzer ().authorize (BigDecimal .ONE , Currency .getInstance ("EUR" ), createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), new URL ("https://www.unzer.com" ), customer .getCustomerId (), false );
8893 assertNotNull (authorize );
@@ -92,7 +97,7 @@ public void testAuthorizeWithCustomerId() throws MalformedURLException, HttpComm
9297 }
9398
9499 @ Test
95- public void testAuthorizeWithReturnUrl () throws MalformedURLException , HttpCommunicationException {
100+ void testAuthorizeWithReturnUrl () throws MalformedURLException , HttpCommunicationException {
96101 Authorization authorize = getUnzer ().authorize (BigDecimal .ONE , Currency .getInstance ("EUR" ), createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), new URL ("https://www.unzer.com" ), false );
97102 assertNotNull (authorize );
98103 assertNotNull (authorize .getId ());
@@ -101,7 +106,7 @@ public void testAuthorizeWithReturnUrl() throws MalformedURLException, HttpCommu
101106 }
102107
103108 @ Test
104- public void testAuthorizeWithCustomerTypeReturnUrl () throws MalformedURLException , HttpCommunicationException {
109+ void testAuthorizeWithCustomerTypeReturnUrl () throws MalformedURLException , HttpCommunicationException {
105110 Unzer unzer = getUnzer (Keys .DEFAULT );
106111 LocalDate locaDateNow = LocalDate .now ();
107112 Card card = new Card ("4444333322221111" , "12/" + (locaDateNow .getYear () + 1 ));
@@ -114,7 +119,7 @@ public void testAuthorizeWithCustomerTypeReturnUrl() throws MalformedURLExceptio
114119 }
115120
116121 @ Test
117- public void testAuthorizeWithCustomerIdReturnUrl () throws MalformedURLException , HttpCommunicationException , ParseException {
122+ void testAuthorizeWithCustomerIdReturnUrl () throws MalformedURLException , HttpCommunicationException , ParseException {
118123 Customer maxCustomer = getMaximumCustomer (generateUuid ());
119124 Authorization authorize = getUnzer ().authorize (BigDecimal .ONE , Currency .getInstance ("EUR" ), createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), new URL ("https://www.unzer.com" ), maxCustomer .getId (), false );
120125 assertNotNull (authorize );
@@ -124,7 +129,7 @@ public void testAuthorizeWithCustomerIdReturnUrl() throws MalformedURLException,
124129 }
125130
126131 @ Test
127- public void testFetchAuthorization () throws MalformedURLException , HttpCommunicationException {
132+ void testFetchAuthorization () throws MalformedURLException , HttpCommunicationException {
128133 Authorization authorize = getUnzer ().authorize (BigDecimal .ONE , Currency .getInstance ("EUR" ), createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), new URL ("https://www.unzer.com" ), false );
129134 assertNotNull (authorize );
130135 assertNotNull (authorize .getId ());
@@ -136,7 +141,7 @@ public void testFetchAuthorization() throws MalformedURLException, HttpCommunica
136141 }
137142
138143 @ Test
139- public void testAuthorizeWithOrderId () throws MalformedURLException , HttpCommunicationException {
144+ void testAuthorizeWithOrderId () throws MalformedURLException , HttpCommunicationException {
140145 String orderId = generateUuid ();
141146 Authorization authorize = getUnzer ().authorize (getAuthorization (createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), null , orderId , null , null , false ));
142147 assertNotNull (authorize );
@@ -151,7 +156,7 @@ public void testAuthorizeWithOrderId() throws MalformedURLException, HttpCommuni
151156 }
152157
153158 @ Test
154- public void testAuthorizeCard3dsFalse () throws MalformedURLException , HttpCommunicationException {
159+ void testAuthorizeCard3dsFalse () throws MalformedURLException , HttpCommunicationException {
155160 String orderId = generateUuid ();
156161 Authorization authorize = getUnzer ().authorize (getAuthorization (createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId (), null , orderId , null , null , false ));
157162 assertNotNull (authorize );
@@ -167,7 +172,7 @@ public void testAuthorizeCard3dsFalse() throws MalformedURLException, HttpCommun
167172 }
168173
169174 @ Test
170- public void testAuthorizeCard3dsTrue () throws MalformedURLException , HttpCommunicationException {
175+ void testAuthorizeCard3dsTrue () throws MalformedURLException , HttpCommunicationException {
171176 String orderId = generateUuid ();
172177 Unzer unzer = getUnzer ();
173178 Authorization authorize = unzer .authorize (getAuthorization (createPaymentTypeCard (unzer , "4711100000000000" ).getId (), null , orderId , null , null , true ));
@@ -184,7 +189,7 @@ public void testAuthorizeCard3dsTrue() throws MalformedURLException, HttpCommuni
184189 }
185190
186191 @ Test
187- public void testAuthorizeWithPaymentReference () throws MalformedURLException , HttpCommunicationException {
192+ void testAuthorizeWithPaymentReference () throws MalformedURLException , HttpCommunicationException {
188193 Authorization authorization = getAuthorization (createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId ());
189194 authorization .setPaymentReference ("pmt-ref" );
190195 Authorization authorize = getUnzer ().authorize (authorization );
@@ -194,7 +199,7 @@ public void testAuthorizeWithPaymentReference() throws MalformedURLException, Ht
194199 }
195200
196201 @ Test
197- public void testAuthorizeWithAuthorizeObject () throws MalformedURLException , HttpCommunicationException {
202+ void testAuthorizeWithAuthorizeObject () throws MalformedURLException , HttpCommunicationException {
198203 Authorization authorization = getAuthorization (createPaymentTypeCard (getUnzer (), "4711100000000000" ).getId ());
199204 authorization .setPaymentReference ("pmt-ref" );
200205 authorization .setAmount (new BigDecimal ("1.0" ));
@@ -207,7 +212,7 @@ public void testAuthorizeWithAuthorizeObject() throws MalformedURLException, Htt
207212
208213 @ Disabled ("Needs further configuration in Testdata" )
209214 @ Test
210- public void testMarketplaceAuthorize () throws MalformedURLException , HttpCommunicationException {
215+ void testMarketplaceAuthorize () throws MalformedURLException , HttpCommunicationException {
211216 String participantId_1 = MARKETPLACE_PARTICIPANT_ID_1 ;
212217 String participantId_2 = MARKETPLACE_PARTICIPANT_ID_2 ;
213218
0 commit comments