Skip to content

Commit

Permalink
Merge pull request #2 from hajk1/fetch-remote-sync
Browse files Browse the repository at this point in the history
Fetch remote sync
  • Loading branch information
hajk1 committed Oct 2, 2023
2 parents a90c8fb + 76051d5 commit 0a1d2e4
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
25 changes: 1 addition & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.release>8</maven.compiler.release>
<jdk7Signature>java17</jdk7Signature>
<skipSigning>true</skipSigning>
<junit-jupiter.version>5.9.2</junit-jupiter.version>
Expand Down Expand Up @@ -265,30 +266,6 @@
<version>2.5.3</version>
</plugin>

<!-- Checking a project against API signatures -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.22</version>
<executions>
<execution>
<id>check-java-api</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature
</groupId>
<artifactId>${jdk8Signature}</artifactId>
<version>1.0</version>
</signature>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/iban4j/bban/BbanStructure.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,18 @@ private BbanStructure(final BbanStructureEntry... entries) {
structures.put(CountryCode.PM, BbanStructure.FRENCH_STRUCTURE);
structures.put(CountryCode.WF, BbanStructure.FRENCH_STRUCTURE);

structures.put(CountryCode.GA,
new BbanStructure(
BbanStructureEntry.bankCode(5, 'n'),
BbanStructureEntry.branchCode(5, 'n'),
BbanStructureEntry.accountNumber(13, 'c')));

structures.put(CountryCode.GA,
new BbanStructure(
BbanStructureEntry.bankCode(5, 'n'),
BbanStructureEntry.branchCode(5, 'n'),
BbanStructureEntry.accountNumber(13, 'c')));

structures.put(CountryCode.GA,
new BbanStructure(
BbanStructureEntry.bankCode(5, 'n'),
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/iban4j/BicUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.iban4j.TestDataHelper.defaultExceptionMessage;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

Expand All @@ -29,7 +30,6 @@ public class BicUtilTest {

public static class InvalidBicValidationTest {

String defaultExceptionMessage ="Expected doThing() to throw, but it didn't";

@Test
public void bicValidationWithNullShouldThrowException() {
Expand Down
14 changes: 14 additions & 0 deletions src/test/java/org/iban4j/IbanTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;
import static org.iban4j.TestDataHelper.defaultExceptionMessage;
import static org.junit.jupiter.api.Assertions.*;

@DisplayName("Iban general test")
Expand Down Expand Up @@ -413,5 +414,18 @@ public void ibanConstructionRandomDoesNotOverwriteIdentificationNumber() {
.buildRandom();
assertThat(iban.getIdentificationNumber(), is(equalTo("1234567890")));
}

@Test
public void ibanConstructionWithLackingNationalCheckDigitShouldThrowExceptionIfValidationRequested() {
IbanFormatException thrown = assertThrows(
IbanFormatException.class,
() -> new Iban.Builder()
.countryCode(CountryCode.NO)
.bankCode("4435")
.accountNumber("0343730")
.build(true),
defaultExceptionMessage);
assertThat(thrown.getMessage(), containsString("nationalCheckDigit is required; it cannot be null"));
}
}
}
1 change: 1 addition & 0 deletions src/test/java/org/iban4j/TestDataHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.Collection;

final class TestDataHelper {
public static final String defaultExceptionMessage ="Expected doThing() to throw, but it didn't";

private TestDataHelper() {
}
Expand Down

0 comments on commit 0a1d2e4

Please sign in to comment.