Add ability to configure locale specific media quality settings.

Part 1 of improve media quality controls. User selection coming soon.
This commit is contained in:
Cody Henthorne
2021-05-03 11:44:20 -04:00
parent 85e0e74bc6
commit 2aad00df85
9 changed files with 195 additions and 106 deletions

View File

@@ -17,7 +17,7 @@ import java.util.Map;
import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
public class PopulationFeatureFlagsTest_determineCountEnabled {
public class LocaleFeatureFlagsTest_getCountryValue {
private final String phoneNumber;
private final Map<String, Integer> countryCounts;
@@ -66,9 +66,9 @@ public class PopulationFeatureFlagsTest_determineCountEnabled {
Log.initialize(new EmptyLogger());
}
public PopulationFeatureFlagsTest_determineCountEnabled(@NonNull String phoneNumber,
@NonNull Map<String, Integer> countryCounts,
long output)
public LocaleFeatureFlagsTest_getCountryValue(@NonNull String phoneNumber,
@NonNull Map<String, Integer> countryCounts,
long output)
{
this.phoneNumber = phoneNumber;
this.countryCounts = countryCounts;
@@ -77,7 +77,7 @@ public class PopulationFeatureFlagsTest_determineCountEnabled {
@Test
public void determineCountEnabled() {
assertEquals(output, PopulationFeatureFlags.determineCountEnabled(countryCounts, phoneNumber));
assertEquals(output, LocaleFeatureFlags.getCountryValue(countryCounts, phoneNumber, 0));
}
}

View File

@@ -12,7 +12,7 @@ import java.util.Map;
import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
public class PopulationFeatureFlagsTest_parseCountryCounts {
public class LocaleFeatureFlagsTest_parseCountryValues {
private final String input;
private final Map<String, Integer> output;
@@ -46,14 +46,14 @@ public class PopulationFeatureFlagsTest_parseCountryCounts {
});
}
public PopulationFeatureFlagsTest_parseCountryCounts(String input, Map<String, Integer> output) {
public LocaleFeatureFlagsTest_parseCountryValues(String input, Map<String, Integer> output) {
this.input = input;
this.output = output;
}
@Test
public void parseCountryCounts() {
assertEquals(output, PopulationFeatureFlags.parseCountryCounts(input));
assertEquals(output, LocaleFeatureFlags.parseCountryValues(input, 0));
}
}