Skip to content

Commit

Permalink
Don't use immutablemap in testing (#5487)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlazo authored Oct 30, 2023
1 parent 3704b6e commit a92113a
Showing 1 changed file with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import android.database.sqlite.SQLiteDatabase;
import androidx.test.core.app.ApplicationProvider;
import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -31,20 +31,16 @@ public class SchemaManagerMigrationTest {
private final int highVersion;
private final int lowVersion;

private static final Map<Integer, StateSimulations.StateSimulator> simulatorMap =
ImmutableMap.of(
1,
new StateSimulations.V1(),
2,
new StateSimulations.V2(),
3,
new StateSimulations.V3(),
4,
new StateSimulations.V4(),
5,
new StateSimulations.V5(),
6,
new StateSimulations.V6());
private static final Map<Integer, StateSimulations.StateSimulator> simulatorMap = new HashMap<>();

static {
simulatorMap.put(1, new StateSimulations.V1());
simulatorMap.put(2, new StateSimulations.V2());
simulatorMap.put(3, new StateSimulations.V3());
simulatorMap.put(4, new StateSimulations.V4());
simulatorMap.put(5, new StateSimulations.V5());
simulatorMap.put(6, new StateSimulations.V6());
}

@ParameterizedRobolectricTestRunner.Parameters(name = "lowVersion = {0}, highVersion = {1}")
public static Collection<Object[]> data() {
Expand Down

0 comments on commit a92113a

Please sign in to comment.