Skip to content

Commit

Permalink
test: remove 'public' modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mvarlic committed Oct 3, 2024
1 parent e4cf19c commit 9c06be9
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 63 deletions.
24 changes: 12 additions & 12 deletions src/test/java/webpayplus/OneclickMallDeferredTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import static org.mockserver.integration.ClientAndServer.startClientAndServer;


public class OneclickMallDeferredTest extends OneclickMallTestBase {
class OneclickMallDeferredTest extends OneclickMallTestBase {

private static String apiUrl = ApiConstants.ONECLICK_ENDPOINT;
private static Options option = new WebpayOptions(IntegrationCommerceCodes.ONECLICK_MALL_DEFERRED,
Expand All @@ -38,21 +38,21 @@ public class OneclickMallDeferredTest extends OneclickMallTestBase {
private static String testToken = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";

@BeforeAll
public static void startProxy() {
static void startProxy() {
client = startClientAndServer(8888);
}

@AfterAll
public static void stopProxy() {
static void stopProxy() {
client.stop();
}
@AfterEach
public void resetMockServer() {
void resetMockServer() {
client.reset();
}

@Test
public void start() throws IOException, InscriptionStartException {
void start() throws IOException, InscriptionStartException {
String url = String.format("/%s/inscriptions",apiUrl);

String urlResponse = "https://webpay3gint.transbank.cl/webpayserver/bp_multicode_inscription.cgi";
Expand All @@ -72,7 +72,7 @@ public void start() throws IOException, InscriptionStartException {
}

@Test
public void finish() throws IOException, InscriptionFinishException {
void finish() throws IOException, InscriptionFinishException {
String url = String.format("/%s/inscriptions/%s", apiUrl, testToken);

byte responseCode = 0;
Expand Down Expand Up @@ -100,21 +100,21 @@ public void finish() throws IOException, InscriptionFinishException {

}
@Test
public void delete() throws IOException, InscriptionDeleteException {
void delete() throws IOException, InscriptionDeleteException {
String url = String.format("/%s/inscriptions", apiUrl);
setResponseDelete(url);
final boolean response = (new Oneclick.MallInscription(option)).delete(tbkUser, username);
assertTrue(response);
}
@Test
public void deleteNotFound() throws IOException, InscriptionDeleteException {
void deleteNotFound() throws IOException, InscriptionDeleteException {
String url = String.format("/%s/inscriptions", apiUrl);
setResponseDeleteError(url, HttpStatusCode.NOT_FOUND_404);
final boolean response = (new Oneclick.MallInscription(option)).delete(tbkUser, username);
assertFalse(response);
}
@Test
public void authorize() throws IOException, TransactionAuthorizeException {
void authorize() throws IOException, TransactionAuthorizeException {
OneclickMallTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions",apiUrl);
setResponsePost(url, generateJsonResponse());
Expand Down Expand Up @@ -163,7 +163,7 @@ public void authorize() throws IOException, TransactionAuthorizeException {
}

@Test
public void refund() throws IOException, TransactionRefundException {
void refund() throws IOException, TransactionRefundException {
String buyOrder = "1643997337";
String url = String.format("/%s/transactions/%s/refunds", apiUrl, buyOrder);

Expand All @@ -185,7 +185,7 @@ public void refund() throws IOException, TransactionRefundException {
}

@Test
public void status() throws IOException, TransactionStatusException {
void status() throws IOException, TransactionStatusException {
OneclickMallTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions/%s", apiUrl, expectedResponse.getBuyOrder());
setResponseGet(url, generateJsonResponse());
Expand Down Expand Up @@ -221,7 +221,7 @@ public void status() throws IOException, TransactionStatusException {
}

@Test
public void capture() throws IOException, TransactionCaptureException {
void capture() throws IOException, TransactionCaptureException {
String url = String.format("/%s/transactions/capture",apiUrl);

String authorizationCode = "138248";
Expand Down
22 changes: 11 additions & 11 deletions src/test/java/webpayplus/OneclickMallTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import static org.junit.jupiter.api.Assertions.*;
import static org.mockserver.integration.ClientAndServer.startClientAndServer;

public class OneclickMallTest extends OneclickMallTestBase {
class OneclickMallTest extends OneclickMallTestBase {

private static String apiUrl = ApiConstants.ONECLICK_ENDPOINT;
private static Options option = new WebpayOptions(IntegrationCommerceCodes.ONECLICK_MALL,
Expand All @@ -37,22 +37,22 @@ public class OneclickMallTest extends OneclickMallTestBase {
private static String testToken = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";

@BeforeAll
public static void startProxy() {
static void startProxy() {
client = startClientAndServer(8888);
}

@AfterAll
public static void stopProxy() {
static void stopProxy() {
client.stop();
}

@AfterEach
public void resetMockServer() {
void resetMockServer() {
client.reset();
}

@Test
public void start() throws IOException, InscriptionStartException {
void start() throws IOException, InscriptionStartException {
String url = String.format("/%s/inscriptions",apiUrl);

String urlResponse = "https://webpay3gint.transbank.cl/webpayserver/bp_multicode_inscription.cgi";
Expand All @@ -72,7 +72,7 @@ public void start() throws IOException, InscriptionStartException {
}

@Test
public void finish() throws IOException, InscriptionFinishException {
void finish() throws IOException, InscriptionFinishException {
String url = String.format("/%s/inscriptions/%s", apiUrl, testToken);

byte responseCode = 0;
Expand Down Expand Up @@ -101,22 +101,22 @@ public void finish() throws IOException, InscriptionFinishException {
}

@Test
public void delete() throws IOException, InscriptionDeleteException {
void delete() throws IOException, InscriptionDeleteException {
String url = String.format("/%s/inscriptions", apiUrl);
setResponseDelete(url);
final boolean response = (new Oneclick.MallInscription(option)).delete(tbkUser, username);
assertTrue(response);
}

@Test
public void deleteNotFound() throws IOException, InscriptionDeleteException {
void deleteNotFound() throws IOException, InscriptionDeleteException {
String url = String.format("/%s/inscriptions", apiUrl);
setResponseDeleteError(url, HttpStatusCode.NOT_FOUND_404);
final boolean response = (new Oneclick.MallInscription(option)).delete(tbkUser, username);
assertFalse(response);
}
@Test
public void authorize() throws IOException, TransactionAuthorizeException {
void authorize() throws IOException, TransactionAuthorizeException {
OneclickMallTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions",apiUrl);
setResponsePost(url, generateJsonResponse());
Expand Down Expand Up @@ -165,7 +165,7 @@ public void authorize() throws IOException, TransactionAuthorizeException {
}

@Test
public void refund() throws IOException, TransactionRefundException {
void refund() throws IOException, TransactionRefundException {
String buyOrder = "1643997337";
String url = String.format("/%s/transactions/%s/refunds", apiUrl, buyOrder);

Expand All @@ -187,7 +187,7 @@ public void refund() throws IOException, TransactionRefundException {
}

@Test
public void status() throws IOException, TransactionStatusException {
void status() throws IOException, TransactionStatusException {
OneclickMallTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions/%s", apiUrl, expectedResponse.getBuyOrder());
setResponseGet(url, generateJsonResponse());
Expand Down
12 changes: 6 additions & 6 deletions src/test/java/webpayplus/PatpassComercioTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,28 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockserver.integration.ClientAndServer.startClientAndServer;

public class PatpassComercioTest extends TestBase {
class PatpassComercioTest extends TestBase {

private static String apiUrl = ApiConstants.PATPASS_COMERCIO_ENDPOINT;
private static Options option = new PatpassOptions(IntegrationCommerceCodes.PATPASS_COMERCIO,
IntegrationApiKeys.PATPASS_COMERCIO, IntegrationType.SERVER_MOCK);
private static String testToken = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";

@BeforeAll
public static void startProxy() {
static void startProxy() {
client = startClientAndServer(8888);
}

@AfterAll
public static void stopProxy() {
static void stopProxy() {
client.stop();
}
@AfterEach
public void resetMockServer() {
void resetMockServer() {
client.reset();
}
@Test
public void start() throws IOException, InscriptionStartException {
void start() throws IOException, InscriptionStartException {

String url = String.format("/%s/patInscription", apiUrl);

Expand Down Expand Up @@ -97,7 +97,7 @@ public void start() throws IOException, InscriptionStartException {
}

@Test
public void status() throws IOException, TransactionStatusException {
void status() throws IOException, TransactionStatusException {

String url = String.format("/%s/status", apiUrl);

Expand Down
18 changes: 9 additions & 9 deletions src/test/java/webpayplus/WebpayPlusDeferredTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockserver.integration.ClientAndServer.startClientAndServer;

public class WebpayPlusDeferredTest extends WebpayPlusTestBase {
class WebpayPlusDeferredTest extends WebpayPlusTestBase {
private static String apiUrl = ApiConstants.WEBPAY_ENDPOINT;
private static Options option = new WebpayOptions(IntegrationCommerceCodes.WEBPAY_PLUS_DEFERRED,
IntegrationApiKeys.WEBPAY, IntegrationType.SERVER_MOCK);
private static String testToken = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";

@BeforeAll
public static void startProxy() {
static void startProxy() {
client = startClientAndServer(8888);
}

@AfterAll
public static void stopProxy() {
static void stopProxy() {
client.stop();
}
@AfterEach
public void resetMockServer() {
void resetMockServer() {
client.reset();
}
@Test
public void create() throws IOException, TransactionCreateException {
void create() throws IOException, TransactionCreateException {
String url = String.format("/%s/transactions", apiUrl);

String urlResponse = "https://webpay3gint.transbank.cl/webpayserver/initTransaction";
Expand All @@ -67,7 +67,7 @@ public void create() throws IOException, TransactionCreateException {
}

@Test
public void commit() throws IOException, TransactionCommitException {
void commit() throws IOException, TransactionCommitException {
WebpayPlusTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions/%s", apiUrl, testToken);
setResponsePut(url, generateCommitJsonResponse());
Expand All @@ -88,7 +88,7 @@ public void commit() throws IOException, TransactionCommitException {
}

@Test
public void refund() throws IOException, TransactionRefundException {
void refund() throws IOException, TransactionRefundException {
String url = String.format("/%s/transactions/%s/refunds", apiUrl, testToken);
double amount = 1000d;
String type = "REVERSED";
Expand All @@ -105,7 +105,7 @@ public void refund() throws IOException, TransactionRefundException {
}

@Test
public void status() throws IOException, TransactionStatusException {
void status() throws IOException, TransactionStatusException {
WebpayPlusTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions/%s", apiUrl, testToken);
setResponseGet(url, generateCommitJsonResponse());
Expand All @@ -126,7 +126,7 @@ public void status() throws IOException, TransactionStatusException {
}

@Test
public void capture() throws IOException, TransactionCaptureException {
void capture() throws IOException, TransactionCaptureException {
String url = String.format("/%s/transactions/%s/capture", apiUrl, testToken);
String authorizationCode = "1213";
String authorizationDate = "2021-08-01T03:17:42.785Z";
Expand Down
18 changes: 9 additions & 9 deletions src/test/java/webpayplus/WebpayPlusMallDeferredTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockserver.integration.ClientAndServer.startClientAndServer;

public class WebpayPlusMallDeferredTest extends WebpayPlusMallTestBase {
class WebpayPlusMallDeferredTest extends WebpayPlusMallTestBase {

private static String apiUrl = ApiConstants.WEBPAY_ENDPOINT;
private static Options option = new WebpayOptions(IntegrationCommerceCodes.WEBPAY_PLUS_MALL_DEFERRED,
IntegrationApiKeys.WEBPAY, IntegrationType.SERVER_MOCK);
private static String testToken = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";

@BeforeAll
public static void startProxy() {
static void startProxy() {
client = startClientAndServer(8888);
}

@AfterAll
public static void stopProxy() {
static void stopProxy() {
client.stop();
}
@AfterEach
public void resetMockServer() {
void resetMockServer() {
client.reset();
}
@Test
public void create() throws IOException, TransactionCreateException {
void create() throws IOException, TransactionCreateException {

String url = String.format("/%s/transactions", apiUrl);

Expand Down Expand Up @@ -78,7 +78,7 @@ public void create() throws IOException, TransactionCreateException {
}

@Test
public void commit() throws IOException, TransactionCommitException {
void commit() throws IOException, TransactionCommitException {
WebpayPlusMallTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions/%s", apiUrl, testToken);
setResponsePut(url, generateCommitJsonResponse());
Expand Down Expand Up @@ -117,7 +117,7 @@ public void commit() throws IOException, TransactionCommitException {


@Test
public void refund() throws IOException, TransactionRefundException {
void refund() throws IOException, TransactionRefundException {

String url = String.format("/%s/transactions/%s/refunds", apiUrl, testToken);
String type = "REVERSED";
Expand All @@ -139,7 +139,7 @@ public void refund() throws IOException, TransactionRefundException {
}

@Test
public void status() throws IOException, TransactionStatusException {
void status() throws IOException, TransactionStatusException {
WebpayPlusMallTransactionStatusResponse expectedResponse = generateStatusResponse();
String url = String.format("/%s/transactions/%s",apiUrl, testToken);
setResponseGet(url, generateCommitJsonResponse());
Expand Down Expand Up @@ -177,7 +177,7 @@ public void status() throws IOException, TransactionStatusException {
}

@Test
public void capture() throws IOException, TransactionCaptureException {
void capture() throws IOException, TransactionCaptureException {
String url = String.format("/%s/transactions/%s/capture", apiUrl, testToken);

String commerceCode = "597055555537";
Expand Down
Loading

0 comments on commit 9c06be9

Please sign in to comment.