mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-01 06:07:37 +00:00
Add support for a donation megaphone.
This commit is contained in:
@@ -2,8 +2,6 @@ package org.thoughtcrime.securesms.util;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.protobuf.Empty;
|
||||
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -19,7 +17,7 @@ import java.util.Map;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public class ResearchMegaphoneTest_determineCountEnabled {
|
||||
public class PopulationFeatureFlagsTest_determineCountEnabled {
|
||||
|
||||
private final String phoneNumber;
|
||||
private final Map<String, Integer> countryCounts;
|
||||
@@ -68,9 +66,9 @@ public class ResearchMegaphoneTest_determineCountEnabled {
|
||||
Log.initialize(new EmptyLogger());
|
||||
}
|
||||
|
||||
public ResearchMegaphoneTest_determineCountEnabled(@NonNull String phoneNumber,
|
||||
@NonNull Map<String, Integer> countryCounts,
|
||||
long output)
|
||||
public PopulationFeatureFlagsTest_determineCountEnabled(@NonNull String phoneNumber,
|
||||
@NonNull Map<String, Integer> countryCounts,
|
||||
long output)
|
||||
{
|
||||
this.phoneNumber = phoneNumber;
|
||||
this.countryCounts = countryCounts;
|
||||
@@ -79,7 +77,7 @@ public class ResearchMegaphoneTest_determineCountEnabled {
|
||||
|
||||
@Test
|
||||
public void determineCountEnabled() {
|
||||
assertEquals(output, ResearchMegaphone.determineCountEnabled(countryCounts, phoneNumber));
|
||||
assertEquals(output, PopulationFeatureFlags.determineCountEnabled(countryCounts, phoneNumber));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import java.util.Map;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
public class ResearchMegaphoneTest_parseCountryCounts {
|
||||
public class PopulationFeatureFlagsTest_parseCountryCounts {
|
||||
|
||||
private final String input;
|
||||
private final Map<String, Integer> output;
|
||||
@@ -46,14 +46,14 @@ public class ResearchMegaphoneTest_parseCountryCounts {
|
||||
});
|
||||
}
|
||||
|
||||
public ResearchMegaphoneTest_parseCountryCounts(String input, Map<String, Integer> output) {
|
||||
public PopulationFeatureFlagsTest_parseCountryCounts(String input, Map<String, Integer> output) {
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseCountryCounts() {
|
||||
assertEquals(output, ResearchMegaphone.parseCountryCounts(input));
|
||||
assertEquals(output, PopulationFeatureFlags.parseCountryCounts(input));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user