Skip to content

Commit d64168b

Browse files
author
Oswald Quek
committed
Fix build
1 parent 123c452 commit d64168b

3 files changed

Lines changed: 20 additions & 20 deletions

File tree

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<testcontainers.version>1.15.1</testcontainers.version>
1616
<postgresql.version>42.2.18</postgresql.version>
1717
<pay-java-commons.version>1.0.20201130170501</pay-java-commons.version>
18-
<junit5.version>5.6.2</junit5.version>
18+
<junit5.version>5.7.0</junit5.version>
1919
<surefire.version>3.0.0-M5</surefire.version>
2020
<guice.version>4.2.3</guice.version>
2121
<rest-assured.version>4.3.3</rest-assured.version>
@@ -182,7 +182,7 @@
182182
<dependency>
183183
<groupId>org.junit.jupiter</groupId>
184184
<artifactId>junit-jupiter-api</artifactId>
185-
<version>5.7.0</version>
185+
<version>${junit5.version}</version>
186186
<scope>test</scope>
187187
</dependency>
188188
<dependency>

src/test/java/uk/gov/pay/ledger/queue/QueueMessageReceiverForTransactionIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import static uk.gov.pay.ledger.util.fixture.QueuePaymentEventFixture.aQueuePaymentEventFixture;
2222

2323
@ExtendWith(DropwizardExtensionsSupport.class)
24-
public class QueueMessageReceiverForTransactionIT {
24+
class QueueMessageReceiverForTransactionIT {
2525

2626
@RegisterExtension
27-
public static AppWithPostgresAndSqsExtension rule = new AppWithPostgresAndSqsExtension(
27+
static AppWithPostgresAndSqsExtension rule = new AppWithPostgresAndSqsExtension(
2828
config("queueMessageReceiverConfig.backgroundProcessingEnabled", "true"));
2929

3030
private final String gatewayAccountId = "test_gateway_account_id";
@@ -35,7 +35,7 @@ public class QueueMessageReceiverForTransactionIT {
3535
"false",
3636
"null"
3737
})
38-
public void paymentCreatedMessageIsPersistedCorrectly(Boolean moto) throws InterruptedException {
38+
void paymentCreatedMessageIsPersistedCorrectly(Boolean moto) throws InterruptedException {
3939
String resourceExternalId = RandomStringUtils.random(10, true, true);
4040
aQueuePaymentEventFixture()
4141
.withResourceExternalId(resourceExternalId)

src/test/java/uk/gov/pay/ledger/transaction/search/common/TransactionSearchParamsValidatorTest.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,77 +12,77 @@
1212
import static org.hamcrest.MatcherAssert.assertThat;
1313
import static org.junit.jupiter.api.Assertions.assertThrows;
1414

15-
public class TransactionSearchParamsValidatorTest {
15+
class TransactionSearchParamsValidatorTest {
1616

17-
TransactionSearchParams searchParams;
17+
private TransactionSearchParams searchParams;
1818

1919
@BeforeEach
20-
public void setup() {
20+
void setup() {
2121
searchParams = new TransactionSearchParams();
2222
}
2323

2424
@Test
25-
public void shouldThrowException_whenInvalidFromDate() {
25+
void shouldThrowException_whenInvalidFromDate() {
2626
searchParams.setFromDate("wrong-date");
2727
UnparsableDateException unparsableDateException = assertThrows(UnparsableDateException.class,
2828
() -> TransactionSearchParamsValidator.validateSearchParams(searchParams, null));
2929
assertThat(unparsableDateException.getMessage(), is("Input from_date (wrong-date) is wrong format"));
3030
}
3131

3232
@Test
33-
public void shouldThrowException_whenInvalidToDate() {
33+
void shouldThrowException_whenInvalidToDate() {
3434
searchParams.setToDate("wrong-date");
3535
UnparsableDateException unparsableDateException = assertThrows(UnparsableDateException.class,
3636
() -> TransactionSearchParamsValidator.validateSearchParams(searchParams, null));
3737
assertThat(unparsableDateException.getMessage(), is("Input to_date (wrong-date) is wrong format"));
3838
}
3939

4040
@Test
41-
public void shouldThrowException_whenInvalidFromSettledDate() {
41+
void shouldThrowException_whenInvalidFromSettledDate() {
4242
searchParams.setFromSettledDate("wrong-date");
4343
UnparsableDateException unparsableDateException = assertThrows(UnparsableDateException.class,
4444
() -> TransactionSearchParamsValidator.validateSearchParams(searchParams, null));
4545
assertThat(unparsableDateException.getMessage(), is("Input from_settled_date (wrong-date) is wrong format"));
4646
}
4747

4848
@Test
49-
public void shouldThrowException_whenInvalidToSettledDate() {
49+
void shouldThrowException_whenInvalidToSettledDate() {
5050
searchParams.setToSettledDate("wrong-date");
5151
UnparsableDateException unparsableDateException = assertThrows(UnparsableDateException.class,
5252
() -> TransactionSearchParamsValidator.validateSearchParams(searchParams, null));
5353
assertThat(unparsableDateException.getMessage(), is("Input to_settled_date (wrong-date) is wrong format"));
5454
}
5555

5656
@Test
57-
public void shouldNotThrowException_whenValidDateFormats() {
57+
void shouldNotThrowException_whenValidDateFormats() {
5858
searchParams.setFromDate("2019-05-01T10:15:30Z");
5959
searchParams.setToDate("2019-05-01T10:15:30Z");
6060
TransactionSearchParamsValidator.validateSearchParams(searchParams, null);
6161
}
6262

6363
@Test
64-
public void shouldNotThrowException_whenValidSettledDateFormats() {
64+
void shouldNotThrowException_whenValidSettledDateFormats() {
6565
searchParams.setFromSettledDate("2020-09-10");
6666
searchParams.setToSettledDate("2020-09-10");
6767
TransactionSearchParamsValidator.validateSearchParams(searchParams, null);
6868
}
6969

7070
@Test
71-
public void validateSearchParamsForCsvShouldNotThrowExceptionForValidParams() {
71+
void validateSearchParamsForCsvShouldNotThrowExceptionForValidParams() {
7272
searchParams.setFromDate("2019-05-01T10:15:30Z");
7373
searchParams.setToDate("2019-05-01T10:15:30Z");
7474
TransactionSearchParamsValidator.validateSearchParamsForCsv(
7575
searchParams, new CommaDelimitedSetParameter("1,2"));
7676
}
7777

7878
@Test
79-
public void validateSearchParamsForCsvShouldThrowExceptionIfGatewayAccountIsNotAvailable() {
79+
void validateSearchParamsForCsvShouldThrowExceptionIfGatewayAccountIsNotAvailable() {
8080
assertThrows(ValidationException.class, () -> TransactionSearchParamsValidator.validateSearchParamsForCsv(
8181
searchParams, null));
8282
}
8383

8484
@Test
85-
public void validateSearchParamsForCsvShouldThrowExceptionIfGatewayAccountIdsIsEmptyString() {
85+
void validateSearchParamsForCsvShouldThrowExceptionIfGatewayAccountIdsIsEmptyString() {
8686
assertThrows(ValidationException.class, () -> TransactionSearchParamsValidator.validateSearchParamsForCsv(
8787
searchParams, new CommaDelimitedSetParameter("")));
8888
}
@@ -92,7 +92,7 @@ public void validateSearchParamsForCsvShouldThrowExceptionIfGatewayAccountIdsIsE
9292
"wrong-date, 2019-05-01T10:15:30Z",
9393
"2019-05-01T10:15:30Z, wrong-date"
9494
})
95-
public void validateSearchParamsForCsvShouldThrowExceptionForInvalidDates(String fromDate, String toDate) {
95+
void validateSearchParamsForCsvShouldThrowExceptionForInvalidDates(String fromDate, String toDate) {
9696
searchParams.setFromDate(fromDate);
9797
searchParams.setToDate(toDate);
9898

@@ -101,15 +101,15 @@ public void validateSearchParamsForCsvShouldThrowExceptionForInvalidDates(String
101101
}
102102

103103
@Test
104-
public void validateFromSettledDateSearchParamsShouldThrowExceptionForInvalidDates() {
104+
void validateFromSettledDateSearchParamsShouldThrowExceptionForInvalidDates() {
105105
searchParams.setFromSettledDate("25/09/2020");
106106
UnparsableDateException unparsableDateException = assertThrows(UnparsableDateException.class,
107107
() -> TransactionSearchParamsValidator.validateSearchParams(searchParams, null));
108108
assertThat(unparsableDateException.getMessage(), is("Input from_settled_date (25/09/2020) is wrong format"));
109109
}
110110

111111
@Test
112-
public void validateToSettledDateSearchParamsShouldThrowExceptionForInvalidDates() {
112+
void validateToSettledDateSearchParamsShouldThrowExceptionForInvalidDates() {
113113
searchParams.setToSettledDate("2020.09.25");
114114
UnparsableDateException unparsableDateException = assertThrows(UnparsableDateException.class,
115115
() -> TransactionSearchParamsValidator.validateSearchParams(searchParams, null));

0 commit comments

Comments
 (0)