-
Notifications
You must be signed in to change notification settings - Fork 25
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 #269 from Backbase/generate-real-rtn-as-bank-code-…
…for-contacts Generate real RTN-s as bank code for contacts
- Loading branch information
Showing
5 changed files
with
61 additions
and
9 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
23 changes: 23 additions & 0 deletions
23
src/test/java/com/backbase/ct/bbfuel/util/CommonHelpersTest.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,23 @@ | ||
package com.backbase.ct.bbfuel.util; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.junit.Test; | ||
|
||
public class CommonHelpersTest { | ||
|
||
@Test | ||
public void testCreateValidRtn() { | ||
assertEquals("000000000", CommonHelpers.createValidRtn(0)); | ||
assertEquals("000000990", CommonHelpers.createValidRtn(99)); | ||
assertEquals("123456780", CommonHelpers.createValidRtn(12345678)); | ||
assertEquals("123123123", CommonHelpers.createValidRtn(12312312)); | ||
assertEquals("111111118", CommonHelpers.createValidRtn(11111111)); | ||
assertEquals("474836473", CommonHelpers.createValidRtn(Integer.MAX_VALUE)); | ||
} | ||
|
||
@Test | ||
public void testCreateRandomValidRtn() { | ||
assertEquals(9, CommonHelpers.createRandomValidRtn().length()); | ||
} | ||
} |