Format number to local locale.
Change-Id: Iffa91eb8c40f09e5ac4cce10f355e348e62d8fce Fixes: 78134172 Test: robotests
This commit is contained in:
@@ -437,6 +437,16 @@ public class ApnEditorTest {
|
||||
assertThat(str).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void formatInteger_shouldParseString() {
|
||||
assertThat(ApnEditor.formatInteger("42")).isEqualTo("42");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void formatInteger_shouldIgnoreNonIntegers() {
|
||||
assertThat(ApnEditor.formatInteger("not an int")).isEqualTo("not an int");
|
||||
}
|
||||
|
||||
private void initCursor() {
|
||||
doReturn(2).when(mCursor).getColumnCount();
|
||||
doReturn(Integer.valueOf(2)).when(mCursor).getInt(CURSOR_INTEGER_INDEX);
|
||||
|
||||
Reference in New Issue
Block a user