Skip to content

Commit 7cbdcee

Browse files
committed
auto formatting
1 parent 2ef2faa commit 7cbdcee

7 files changed

Lines changed: 121 additions & 16 deletions

File tree

src/main/java/it/aboutbits/springboot/toolbox/exception/ExceptionMessageDefinition.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
* <p>
77
* Example:
88
* {@snippet :
9+
*
910
* @Getter
1011
* @Accessors(fluent = true)
11-
* @RequiredArgsConstructor
12-
* enum MyExceptionMessages implements ExceptionMessageDefinition {
13-
* SHARED_ERROR_GENERAL("shared.error.general");
14-
*
15-
* private final String code;
16-
* }
12+
* @RequiredArgsConstructor enum MyExceptionMessages implements ExceptionMessageDefinition {
13+
* SHARED_ERROR_GENERAL("shared.error.general");
14+
* <p>
15+
* private final String code;
1716
* }
17+
*}
1818
*/
1919
public interface ExceptionMessageDefinition {
2020
String code();

src/main/java/it/aboutbits/springboot/toolbox/persistence/transformer/TransformerRuntimeException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ public TransformerRuntimeException(final Throwable cause) {
1616
super(cause);
1717
}
1818

19-
public TransformerRuntimeException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {
19+
public TransformerRuntimeException(
20+
final String message,
21+
final Throwable cause,
22+
final boolean enableSuppression,
23+
final boolean writableStackTrace
24+
) {
2025
super(message, cause, enableSuppression, writableStackTrace);
2126
}
2227
}

src/test/java/it/aboutbits/springboot/toolbox/autoconfiguration/persistence/impl/jpa/CustomTypeTestModelRepository.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public interface CustomTypeTestModelRepository extends JpaRepository<CustomTypeT
1616
Optional<CustomTypeTestModel> findByAccountBalance(ScaledBigDecimal accountBalance);
1717

1818
Optional<CustomTypeTestModel> findByUuid(UUID uuid);
19+
1920
Optional<CustomTypeTestModel> findByUuidAsString(UUID uuidAsString);
2021

2122
Optional<CustomTypeTestModel> findByReferencedId(ReferencedTestModel.ID otherId);

src/test/java/it/aboutbits/springboot/toolbox/type/EmailAddressTest.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,21 @@ void validValues_shouldSucceed(String value) {
2121
}
2222

2323
@ParameterizedTest
24-
@ValueSource(strings = {"", " ", " ", "\t", "\r", "\n", "sepp", "x@ y", "@aboutbits.it", "hans mueller@aboutbits.it", "peter@pansky@aboutbits.it"})
24+
@ValueSource(
25+
strings = {
26+
"",
27+
" ",
28+
" ",
29+
"\t",
30+
"\r",
31+
"\n",
32+
"sepp",
33+
"x@ y",
34+
"@aboutbits.it",
35+
"hans mueller@aboutbits.it",
36+
"peter@pansky@aboutbits.it"
37+
}
38+
)
2539
void invalidValues_shouldFail(String value) {
2640
assertThatIllegalArgumentException().isThrownBy(
2741
() -> new EmailAddress(value)

src/test/java/it/aboutbits/springboot/toolbox/type/IbanTest.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,34 @@ class IbanTest {
1313
@Nested
1414
class Constructor {
1515
@ParameterizedTest
16-
@ValueSource(strings = {"NL08INGB3330533676", "HR3425000097537651489", "IT37G0300203280237914848919", "AT705400073311799347", "DE60500105175378199617"})
16+
@ValueSource(
17+
strings = {
18+
"NL08INGB3330533676",
19+
"HR3425000097537651489",
20+
"IT37G0300203280237914848919",
21+
"AT705400073311799347",
22+
"DE60500105175378199617"
23+
}
24+
)
1725
void validValues_shouldSucceed(String value) {
1826
assertThatCode(
1927
() -> new Iban(value)
2028
).doesNotThrowAnyException();
2129
}
2230

2331
@ParameterizedTest
24-
@ValueSource(strings = {"IT60X0542811101000000123450", "some-wrong-stuff", "", " ", " ", "\t", "\r", "\n"})
32+
@ValueSource(
33+
strings = {
34+
"IT60X0542811101000000123450",
35+
"some-wrong-stuff",
36+
"",
37+
" ",
38+
" ",
39+
"\t",
40+
"\r",
41+
"\n"
42+
}
43+
)
2544
void invalidValues_shouldFail(String value) {
2645
assertThatIllegalArgumentException().isThrownBy(
2746
() -> new Iban(value)

src/test/java/it/aboutbits/springboot/toolbox/validation/util/EmailAddressValidatorTest.java

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ void validValues_shouldSucceed(String value) {
1919
}
2020

2121
@ParameterizedTest
22-
@ValueSource(strings = {"", " ", " ", "\t", "\r", "\n", "sepp", "x@ y", "@aboutbits.it", "hans mueller@aboutbits.it", "peter@pansky@aboutbits.it"})
22+
@ValueSource(
23+
strings = {
24+
"",
25+
" ",
26+
" ",
27+
"\t",
28+
"\r",
29+
"\n",
30+
"sepp",
31+
"x@ y",
32+
"@aboutbits.it",
33+
"hans mueller@aboutbits.it",
34+
"peter@pansky@aboutbits.it"
35+
}
36+
)
2337
void invalidValues_shouldFail(String value) {
2438
assertThat(
2539
EmailAddressValidator.isValid(value)
@@ -45,7 +59,21 @@ void validValues_shouldSucceed(String value) {
4559
}
4660

4761
@ParameterizedTest
48-
@ValueSource(strings = {"", " ", " ", "\t", "\r", "\n", "sepp", "x@ y", "@aboutbits.it", "hans mueller@aboutbits.it", "peter@pansky@aboutbits.it"})
62+
@ValueSource(
63+
strings = {
64+
"",
65+
" ",
66+
" ",
67+
"\t",
68+
"\r",
69+
"\n",
70+
"sepp",
71+
"x@ y",
72+
"@aboutbits.it",
73+
"hans mueller@aboutbits.it",
74+
"peter@pansky@aboutbits.it"
75+
}
76+
)
4977
void invalidValues_shouldFail(String value) {
5078
assertThat(
5179
EmailAddressValidator.isNotValid(value)

src/test/java/it/aboutbits/springboot/toolbox/validation/util/IbanValidatorTest.java

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,34 @@ class IbanValidatorTest {
1111
@Nested
1212
class IsValid {
1313
@ParameterizedTest
14-
@ValueSource(strings = {"NL08INGB3330533676", "HR3425000097537651489", "IT37G0300203280237914848919", "AT705400073311799347", "DE60500105175378199617"})
14+
@ValueSource(
15+
strings = {
16+
"NL08INGB3330533676",
17+
"HR3425000097537651489",
18+
"IT37G0300203280237914848919",
19+
"AT705400073311799347",
20+
"DE60500105175378199617"
21+
}
22+
)
1523
void validValues_shouldSucceed(String value) {
1624
assertThat(
1725
IbanValidator.isValid(value)
1826
).isTrue();
1927
}
2028

2129
@ParameterizedTest
22-
@ValueSource(strings = {"IT60X0542811101000000123450", "some-wrong-stuff", "", " ", " ", "\t", "\r", "\n"})
30+
@ValueSource(
31+
strings = {
32+
"IT60X0542811101000000123450",
33+
"some-wrong-stuff",
34+
"",
35+
" ",
36+
" ",
37+
"\t",
38+
"\r",
39+
"\n"
40+
}
41+
)
2342
void invalidValues_shouldFail(String value) {
2443
assertThat(
2544
IbanValidator.isValid(value)
@@ -37,15 +56,34 @@ void null_shouldFail() {
3756
@Nested
3857
class IsNotValid {
3958
@ParameterizedTest
40-
@ValueSource(strings = {"NL08INGB3330533676", "HR3425000097537651489", "IT37G0300203280237914848919", "AT705400073311799347", "DE60500105175378199617"})
59+
@ValueSource(
60+
strings = {
61+
"NL08INGB3330533676",
62+
"HR3425000097537651489",
63+
"IT37G0300203280237914848919",
64+
"AT705400073311799347",
65+
"DE60500105175378199617"
66+
}
67+
)
4168
void validValues_shouldSucceed(String value) {
4269
assertThat(
4370
IbanValidator.isNotValid(value)
4471
).isFalse();
4572
}
4673

4774
@ParameterizedTest
48-
@ValueSource(strings = {"IT60X0542811101000000123450", "some-wrong-stuff", "", " ", " ", "\t", "\r", "\n"})
75+
@ValueSource(
76+
strings = {
77+
"IT60X0542811101000000123450",
78+
"some-wrong-stuff",
79+
"",
80+
" ",
81+
" ",
82+
"\t",
83+
"\r",
84+
"\n"
85+
}
86+
)
4987
void invalidValues_shouldFail(String value) {
5088
assertThat(
5189
IbanValidator.isNotValid(value)

0 commit comments

Comments
 (0)