Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CODEC-311: Add unit test
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
  • Loading branch information
arthurscchan committed Nov 24, 2023
commit f33a657e27a976096b1fff3db80b38146b57bc42
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ public void testGetMappingCodeNonLetter() {
assertEquals(0, code, "Code does not equals zero");
}

@Test
public void testInvalidSoundexCharacter() {
final char[] invalid = new char[256];
for (int i = 0; i < invalid.length; i++) {
invalid[i] = (char)i;
}

assertEquals(new RefinedSoundex().encode(new String(invalid)), "A0136024043780159360205050136024043780159360205053");
}

@Test
public void testNewInstance() {
assertEquals("D6043", new RefinedSoundex().soundex("dogs"));
Expand Down