android10_Launcher3_original

This commit is contained in:
bryan.xiang committed 2020-02-29 10:01:57 +08:00
1 parent 7fd766734d
commit 6591b1156b
1146 files changed
+147198

No files matched your search

@@ -0,0 +1,36 @@
package com.android.launcher3.config;
import com.android.launcher3.config.FlagOverrideRule.FlagOverride;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Sample Robolectric test that demonstrates flag-overriding.
*/
@RunWith(RobolectricTestRunner.class)
public class FlagOverrideSampleTest {
// Check out https://junit.org/junit4/javadoc/4.12/org/junit/Rule.html for more information
// on @Rules.
@Rule
public final FlagOverrideRule flags = new FlagOverrideRule();
@FlagOverride(key = "EXAMPLE_FLAG", value = true)
@Test
public void withFlagOn() {
assertTrue(FeatureFlags.EXAMPLE_FLAG.get());
}
@FlagOverride(key = "EXAMPLE_FLAG", value = false)
@Test
public void withFlagOff() {
assertFalse(FeatureFlags.EXAMPLE_FLAG.get());
}
}