-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from getyoti/hotfix-2.6.1
Hotfix-2.6.1
- Loading branch information
Showing
17 changed files
with
125 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...a/com/yoti/api/client/spi/remote/DocumentDetailsAttributeParserConsecutiveSpacesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.yoti.api.client.spi.remote; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
|
||
import java.util.Arrays; | ||
|
||
@RunWith(Parameterized.class) | ||
public class DocumentDetailsAttributeParserConsecutiveSpacesTest { | ||
|
||
@Parameterized.Parameters(name = "{index}: Test with {0}") | ||
public static Iterable<Object[]> data() { | ||
return Arrays.asList(new Object[][] { | ||
{"PASSPORT GBR 1234abc"}, | ||
{"PASSPORT GBR 1234abc"}, | ||
{"DRIVING_LICENCE GBR 1234abc 2016-05-01 DVLA"}, | ||
{"DRIVING_LICENCE GBR 1234abc 2016-05-01 DVLA"} | ||
}); | ||
} | ||
|
||
private String testValue; | ||
|
||
public DocumentDetailsAttributeParserConsecutiveSpacesTest(String testValue) { | ||
this.testValue = testValue; | ||
} | ||
|
||
@Test(expected = IllegalArgumentException.class) | ||
public void shouldFailForMoreThanoneConsecutiveSpace() throws Exception { | ||
new DocumentDetailsAttributeParser().parseFrom(testValue); | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...a/com/yoti/api/client/spi/remote/DocumentDetailsAttributeParserSpecialCharactersTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.yoti.api.client.spi.remote; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.is; | ||
|
||
import com.yoti.api.client.DocumentDetails; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
|
||
import java.util.Arrays; | ||
|
||
@RunWith(Parameterized.class) | ||
public class DocumentDetailsAttributeParserSpecialCharactersTest { | ||
|
||
@Parameterized.Parameters(name = "{index}: Test with {0}") | ||
public static Iterable<Object[]> data() { | ||
return Arrays.asList(new Object[][] { | ||
{"****"}, | ||
{"~!@#$%^&*()-_=+[]{}|;':,./<>?"}, | ||
{"\"\""}, | ||
{"\\"}, | ||
{"\""}, | ||
{"''"}, | ||
{"'"} | ||
}); | ||
} | ||
|
||
private String testValue; | ||
|
||
public DocumentDetailsAttributeParserSpecialCharactersTest(String testValue) { | ||
this.testValue = testValue; | ||
} | ||
|
||
@Test | ||
public void shouldParseDocumentDetailsWithSpecialCharacters() throws Exception { | ||
DocumentDetails result = new DocumentDetailsAttributeParser() | ||
.parseFrom(String.format("PASS_CARD GBR %s - DVLA", testValue)); | ||
|
||
assertThat(result.getDocumentNumber(), is(testValue)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters