Skip to content

Commit

Permalink
test: remove no longer supported below api 21 test
Browse files Browse the repository at this point in the history
disable Pull request CI temporarily

re-enable Pull request CI
  • Loading branch information
thatfiredev committed Jul 20, 2023
1 parent 400b4c6 commit bab9313
Showing 1 changed file with 0 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,38 +83,6 @@ public void testGetCountryCode() {
assertEquals(null, getCountryCode(new Locale("", "DJJZ").getCountry()));
}

@Test
@Config(sdk = 16)
public void testFormatNumberToE164_belowApi21() {
String validPhoneNumber = "+919994947354";
CountryInfo indiaCountryInfo = new CountryInfo(new Locale("", "IN"), 91);
// no leading plus
assertEquals(validPhoneNumber, format("9994947354", indiaCountryInfo));
// fully formatted
assertEquals(validPhoneNumber, format("+919994947354", indiaCountryInfo));
// parantheses and hyphens
assertEquals(validPhoneNumber, format("(99949) 47-354", indiaCountryInfo));

// The following cases would fail for lower api versions.
// Leaving tests in place to formally identify cases

// no leading +
// assertEquals(validPhoneNumber, format("919994947354", indiaCountryInfo));

// with hyphens
// assertEquals(validPhoneNumber, format("+91-(999)-(49)-(47354)",
// indiaCountryInfo));

// with spaces leading plus
// assertEquals(validPhoneNumber, format("+91 99949 47354", indiaCountryInfo));

// space formatting
// assertEquals(validPhoneNumber, format("91 99949 47354", indiaCountryInfo));

// invalid phone number
// assertNull(format("999474735", indiaCountryInfo));
}

@Test
public void testGetCurrentCountryInfo_fromSim() {
Context context = mock(Context.class);
Expand Down

0 comments on commit bab9313

Please sign in to comment.